Skip to content

Commit

Permalink
Allow custom message in DynamicMultiFileNotBlankValidator constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Aug 12, 2024
1 parent 1192899 commit bc2d611
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- **[BUGFIX]** Use Pimcore AdminUserTranslator for Editable Dialog Box [#450](https://github.com/dachcom-digital/pimcore-formbuilder/issues/450)
- **[BUGFIX]** CSV Export: Ignore mail params with empty data [#461](https://github.com/dachcom-digital/pimcore-formbuilder/issues/461)
- **[IMPROVEMENT]** Improve json response success message behaviour [#416](https://github.com/dachcom-digital/pimcore-formbuilder/issues/416)
- **[IMPROVEMENT]** Allow custom message in `DynamicMultiFileNotBlankValidator` constraint [#438](https://github.com/dachcom-digital/pimcore-formbuilder/issues/438)
- **[IMPROVEMENT]** [#458](https://github.com/dachcom-digital/pimcore-formbuilder/pull/458)
- Allow to modify FormType options via `FORM_TYPE_OPTIONS` event
- Do not render `formRuntimeDataToken` if csrf has been disabled in form options
Expand Down
7 changes: 7 additions & 0 deletions src/Validator/Constraints/DynamicMultiFileNotBlank.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,11 @@
class DynamicMultiFileNotBlank extends Constraint
{
public string $message = 'This value should not be blank.';

public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, mixed $payload = null)
{
parent::__construct($options ?? [], $groups, $payload);

$this->message = $message ?? $this->message;
}
}

0 comments on commit bc2d611

Please sign in to comment.