kabatak
New Member
Hi, how do you validate that atleast 1 checkbox must be checked in an array of checkboxes? Example:
The form must not submit if no checkbox was checked and it should only submit if atleast 1 checkbox is checked.
Code:
<form>
<input type="checkbox" name="checkbox[]">
<input type="checkbox" name="checkbox[]">
<input type="checkbox" name="checkbox[]">
<input type="submit">
</form>
The form must not submit if no checkbox was checked and it should only submit if atleast 1 checkbox is checked.