HTML.form.guide

jquery validation

Checkbox validation using jQuery

Suppose you have a check box with ID agree_checkbox. You can check whether the checkbox is checked using this jQuery code: $('#agree_checkbox').prop('checked') Here is a complete example: See the Pen Checkbox validation using jQuery by Prasanth (@prasanthmj) on CodePen. Here is the code that does the check: $("#myform").on("submit",function(form) { if(!$("#agree_checkbox").prop("checked")) { $("#agree_chk_error").show(); } else { $("#agree_chk_error").hide(); } return false; })

Continue Reading →