If you use a standard plugin , this code should be supported:
$(document).ready(function() {
$("#myForm").validate({
submitHandler: function(form) {
SomeFuncHere();
}
});
})
After successful verification, you should call the code submitHandler.
: :
$("#myform").validate({
submitHandler: function(form) {
var cboxes = ($('input:checkbox:checked').filter(":checked").length);
var nboxes = ($(":checkbox:not(:checked)").length);
var flag = false;
if ((cboxes > 0) && (nboxes > 0)) {
flag = confirm('You have Checked only few locations among the List. \n Are you sure, you do not want to Prescribe from the other locations? ');
} else if (cboxes == 0) {
alert('Please select atleast One Address \n Where you would prefer to prescribe from.');
}
else {
flag = true;
}
return flag;
}
});