Start Validating multiple checkboxes using javascript

Validating multiple checkboxes using javascript

I've implemented a custom validator to be able to verify that at least one of many checkboxes is selected.

I only don't like that I have to manually call validate for one Checked-Validator on form submission.

You can set the value to be a ‘1’ or ‘on’ instead of ‘Yes’.

Make sure the check in the PHP code is also updated accordingly.

Notice that the value attribute for the first option is empty if you set it to something else do the same in the if condition in Javascript.