Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] validate subforms in all validation groups#36865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedMay 19, 2020
| Q | A |
|---|---|
| Branch? | 3.4 |
| Bug fix? | yes |
| New feature? | no |
| Deprecations? | no |
| Tickets | Fix#36852 |
| License | MIT |
| Doc PR |
| // in different steps without breaking early enough | ||
| $this->resolvedGroups[$field] = (array)$group; | ||
| $validator->atPath(sprintf($fieldPropertyPath,$field->getPropertyPath()))->validate($field,$formConstraint); | ||
| $fieldFormConstraint =newForm(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is needed for now to prevent hash collisions (see also#36415).
| /* @var $metadata ClassMetadata */ | ||
| $metadata->addConstraint(newForm()); | ||
| $metadata->addPropertyConstraint('children',newValid()); | ||
| $metadata->traversalStrategy = TraversalStrategy::NONE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
traversal happens explicitly inside theFormValidator
d17a4d2 to2fa63a5Comparexabbuh commentedMay 21, 2020
This is ready to be reviewed. |
68fcedb to27d9f82Comparexabbuh commentedMay 21, 2020
/cc@HeahDude |
src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
lyrixx commentedMay 29, 2020
nicolas-grekas commentedMay 30, 2020
Thank you@xabbuh. |
bendavies commentedJun 1, 2020
This breaks property mapping in some way. |
xabbuh commentedJun 1, 2020
Maybe the same as#37027? |