Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #30595 Do not validate child constraints if form has no validatio…
…n groups (maryo) This PR was merged into the 3.4 branch. Discussion ---------- Do not validate child constraints if form has no validation groups | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT If a form has `Valid` constraint and `validation_groups` set to an empty array (to disable validation) then its children were still validated using default validation group because `FormValidator` validated the form data using the empty array validation group here https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php#L76 and then `RecursiveContextualValidator` treats the empty array as default validation group here. https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L86 Commits ------- f45f0d0 [Form] Preventing validation of children if parent with Valid constraint has no validation groups
- Loading branch information