-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Form] Made validation of form children configurable. Set the option …
…"cascade_validation" to `true` if you need it.
- Loading branch information
Showing
4 changed files
with
104 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,7 @@ public function buildForm(FormBuilder $builder, array $options) | |
$builder | ||
->setAttribute('validation_groups', $options['validation_groups']) | ||
->setAttribute('validation_constraint', $options['validation_constraint']) | ||
->setAttribute('cascade_validation', $options['cascade_validation']) | ||
->addValidator(new DelegatingValidator($this->validator)); | ||
} | ||
|
||
|
@@ -46,6 +47,7 @@ public function getDefaultOptions(array $options) | |
return array( | ||
'validation_groups' => null, | ||
'validation_constraint' => null, | ||
'cascade_validation' => false, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
webmozart
Author
Contributor
|
||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Why is default value
false
?