jq validation code example
Example 1: invoking jquery validator
$(document).ready(function () {
$('#myform').validate({ // initialize the plugin
// rules & options
});
$('#button').click(function() {
if ($('#myform').valid()) {
alert('form is valid - not submitted');
} else {
alert('form is not valid');
}
});
});
Example 2: jquery validate
$("#myform").validate({
debug: true
});