HTML Form Checkbox with required validation
The code below shows how to create a single checkbox with “required” validation. Make sure you have not selected the checkbox and then press the submit button to see the error message. See the Pen Checkbox required validation by Prasanth (@prasanthmj) on CodePen. Required Validation for a group of checkboxes Although the HTML5 ‘required’ validation will work fine with Single checkboxes, there is no HTML5 validation for a group of checkboxes.