jdorn / json-editor

JSON Schema Based Editor
MIT License
5.8k stars 1.08k forks source link

Q: How do you make a checkbox required? #843

Closed Tysiana closed 3 years ago

Tysiana commented 3 years ago

I have a confirmation checkbox defined as so: "Confirm":{"type":"boolean","required":true,"value":true,"title":"Do you accept the terms of use","minLength":1,"format":"checkbox"}

It's also added in the required array: "required": ["Example select","Confirm","Name"] but the editor.validate() never returns an error for this when the checkbox is not checked. Is there a way to make the checkbox required?

Thanks a lot for any suggestions