[Form] ChoiceType
children are always considered valid
#60690
Labels
ChoiceType
children are always considered valid
#60690
Uh oh!
There was an error while loading. Please reload this page.
Symfony version(s) affected
6.4.* / 7.*
Description
When a
ChoiceType
field with'expanded' => true
is submitted, all children are considered valid even if a selected value is invalid. Only the parent is considered invalid ('valid' => false
in the form view data).How to reproduce
Create a form with the following field:
Then select
foo
and/orbar
and submit the form.'valid' => false
)'valid' => true
) whereasfoo
andbar
should be invalid ('valid' => false
)reproducer
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: