I've got a boolean field,
is_operable = BooleanField(widget=RadioSelect(choices=YES_OR_NO, renderer=InlineRadioFieldRenderer), required=False, initial=True)
Which is rendered as two radio buttons (yes or no), but I want it to be required. The problem is that if I change it to required=True
, it throws a validation error when it gets False
.
Is there a way around this?
YES_OR_NO = (
(True, 'Yes'),
(False, 'No')
)