-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Description
This is an issue being there since 2.1.
The FormValidator runs the validation of the underlying object graph in 2 cases:
- on the root form
- in case all parents have
cascade_validationset totrue
This means that when you have a subform with mapped set to false, the only way to have its object graph validation is to enable cascade_validation on all parents of the unmapped field, which will lead to duplicate validation of the object graph of the parent if it uses @Assert\Valid() properly.
As unmapped forms define a new object graph, I think it would make sense to run the validation on them as well.
/cc @webmozart