Skip to content

Commit 8451723

Browse files
authored
Allow custom message in DynamicMultiFileNotBlankValidator constraint (#467)
1 parent 1192899 commit 8451723

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

UPGRADE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- **[BUGFIX]** Use Pimcore AdminUserTranslator for Editable Dialog Box [#450](https://github.com/dachcom-digital/pimcore-formbuilder/issues/450)
77
- **[BUGFIX]** CSV Export: Ignore mail params with empty data [#461](https://github.com/dachcom-digital/pimcore-formbuilder/issues/461)
88
- **[IMPROVEMENT]** Improve json response success message behaviour [#416](https://github.com/dachcom-digital/pimcore-formbuilder/issues/416)
9+
- **[IMPROVEMENT]** Allow custom message in `DynamicMultiFileNotBlankValidator` constraint [#438](https://github.com/dachcom-digital/pimcore-formbuilder/issues/438)
910
- **[IMPROVEMENT]** [#458](https://github.com/dachcom-digital/pimcore-formbuilder/pull/458)
1011
- Allow to modify FormType options via `FORM_TYPE_OPTIONS` event
1112
- Do not render `formRuntimeDataToken` if csrf has been disabled in form options

src/Validator/Constraints/DynamicMultiFileNotBlank.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,11 @@
77
class DynamicMultiFileNotBlank extends Constraint
88
{
99
public string $message = 'This value should not be blank.';
10+
11+
public function __construct(?array $options = null, ?string $message = null, ?array $groups = null, mixed $payload = null)
12+
{
13+
parent::__construct($options ?? [], $groups, $payload);
14+
15+
$this->message = $message ?? $this->message;
16+
}
1017
}

0 commit comments

Comments
 (0)