-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 5.1.6
Description
When using the AtLeastOneOf
constraint with custom validation groups, there are not provided to the sub constraints, it always looks for the Default
group.
How to reproduce
So, if you have this kind of validation schema :
myProperty:
- AtLeastOneOf:
groups: [myGroup]
constraints:
- Range:
min: 10
max: 20
groups: [myGroup]
- Range:
min: 30
max: 40
groups: [myGroup]
And you validate your entity with myGroup
, then it finds the AtLeastOneOf
constraint, but not the two Range constraints, as the AtLeastOneOf
looks for constraints matching the Default
group.
To make it actually works, I have to set the Ranges' groups to [Default]
Thanks !