Answers for "jquery validate checkbox before submit"

0

jquery validate checkbox before submit

$(document).ready(function() {
    $('#form1').submit(function() {
        if ($('input:checkbox', this).length == $('input:checked', this).length ) {
            // everything's fine...
        } else {
            alert('Please tick all checkboxes!');
            return false;
        }
    });
});
Posted by: Guest on December-10-2020

Code answers related to "jquery validate checkbox before submit"

Code answers related to "Javascript"

Browse Popular Code Answers by Language