The problem may be in the custom validator but I can not spot any error and it is a really simple piece of code. Until now I treated this case (many checkboxes representing a unique group) as if they were radiobuttons, that's why I implemented it that way.
Make sure the check in the PHP code is also updated accordingly.Please note that the checkboxes have the exact same name ( form Door[ ] ). Using the same name indicates that these checkboxes are all related.Using [ ] indicates that the selected values will be accessed by PHP script as an array.It is checking that at least one checkbox is checked.I only don't like that I have to manually call validate for one Checked-Validator on form submission. In the case of a checkbox multiple values can be selected so validation is done if none of the checkboxes are ticked.
You can also validate by requiring the user to select a minimum of one value or two value according to your requirement.
I've implemented a custom validator to be able to verify that at least one of many checkboxes is selected.
However, sometimes when checking and un-checking the checkboxes, the submit button still appears as disabled and some other times, the checkboxes are still marked as with error (in red).
We need to check if it is equal to null or “” because different browsers act differently so its better to check for both the conditions.