Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Validator] Assert Valid with many groups#36216
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
src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
| if ($constraintinstanceof Composite) { | ||
| // instanceof Valid: In case of using a Valid constraint with many groups | ||
| // it makes a reference object get validated by each group | ||
| if ($constraintinstanceof Composite ||$constraintinstanceof Valid) { |
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.
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.
Indeed, looks good to me too.
phucwan91 commentedMar 27, 2020
HeahDude left a comment
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.
Thanks for that PR
| if ($constraintinstanceof Composite) { | ||
| // instanceof Valid: In case of using a Valid constraint with many groups | ||
| // it makes a reference object get validated by each group | ||
| if ($constraintinstanceof Composite ||$constraintinstanceof Valid) { |
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.
Indeed, looks good to me too.
xabbuh commentedMar 28, 2020
Thank you@phucwan91. |
Make a reference object get validated by each group when using the Valid constraint with many groups