diff --git a/UPGRADE.md b/UPGRADE.md index c0cd9f1d..d0ce323d 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -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 diff --git a/src/Validator/Constraints/DynamicMultiFileNotBlank.php b/src/Validator/Constraints/DynamicMultiFileNotBlank.php index 4d49b94e..1ca525db 100644 --- a/src/Validator/Constraints/DynamicMultiFileNotBlank.php +++ b/src/Validator/Constraints/DynamicMultiFileNotBlank.php @@ -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; + } }