I have on problem with custom validation.
I made one form which post data to some function before it post there is some custom validation rule I made and then I call submitHandler but that’s not working.
$(document).ready(function(){
$("#faculty").validate({
rules: {
designation: {
required: true
},
faculty_qual: {
required: true
}
},
messages: {
designation: 'Please select a Dasignation.',
faculty_qual: 'Please select qualification'
}
submitHandler: function(form) {
create_faculty();
}
});
Now when I run this I got some error Uncaught SyntaxError: Unexpected identifier
Now how will I send this data with this custom validation.
Seems like a syntactic error. You are missing a colon after the
messagesobject and a semicolon and a parenthesis and semicolon at the end of thevalidatefunction invocation.