I am having a form with many fields including TextFields, Dropdowns, DateFields, Checkboxes, Radiobuttons etc.
I am validating the most fields by making them REQUIRED. But I didn't found way to make Checkbox field required. So I am doing it by script by making its MANADATORY property to true. I am validating fields at the Form's preSubmit event.
All I want to know that whether it is the right way to validation i.e.
Making field.mandatory = true; (for checkboxes or may be some other field too)
Check it at preSubmit event of the form;
I want to code it according to best practices. That's why this question bounces up in the mind.