When trying to save the form, validation correctly shows: Minimum 1 items required.
But it's setting up the initial values of the dropdowns to empty string, see below:
When saving the form again, validation correctly shows: Invalid choice
Using widget.validate_on_submit=True helps with the first problem (setting initial values for dropdowns) but it does not behave correctly with the choices, see below
Hey!
I encountered a strange validation behavior when using the below schema:
When trying to save the form, validation correctly shows:
Minimum 1 items required.
But it's setting up the initial values of the dropdowns to empty string, see below:When saving the form again, validation correctly shows:
Invalid choice
Using
widget.validate_on_submit=True
helps with the first problem (setting initial values for dropdowns) but it does not behave correctly with thechoices
, see belowExpected behavior: