ModelMultipleChoiceField validation works differently depending on the widget
I have a form with ModelMultipleChoiceField
and it works like a charm. However, when I install widget=forms.RadioSelect
, the form validation always fails with an "Please enter a list of values" error message.
As I said, it works fine with the default widgets, but not with the radio selection widgets. The request POST
for validating the form is exactly the same, everything is exactly the same except for the widget, so I can't figure out what I'm doing wrong.
Why is this?
EDIT: Perhaps I should have mentioned what it works with CheckboxSelectMultiple
.
EDIT2: It doesn't even seem like I'm setting required=False
, it still tells me to "enter a list of values".
a source to share