Open ndbroadbent opened 4 years ago
Ahhhh, this is the isEmpty
function in ListField:
isEmpty: function()
{
return this.data.length === 0;
},
And Alpaca.Fields.CheckBoxField
inherits from Alpaca.Fields.ListField
.
Otherwise it would have worked fine if it used the isEmpty
function from Field
:
isEmpty: function()
{
return Alpaca.isValEmpty(this.getValue());
},
I saw the docs for the Checkbox Field, and I think the code is not properly handling "required" fields:
When a checkbox is unchecked, this should set the field value to "false", and this should be considered a valid value. Right now I am unable to submit the form and the checkbox shows a validation error when it is unchecked.
(Might also be related to #528, but that issue didn't have enough context.)