How to clear Jquery validation error messages ?
- by Yashwant Chavan
Hi, I am using jquery validation plugin for client side validation.
but i want to clear error mesages on my form clear button
editUser() is called on click of Edit User button.
clear button having separated function clearUser(){
// Need to clear previous errors here
}
function editUser(){
var validator = $("#editUserForm").validate({
rules: {
userName: "required"
},
errorElement: "span" ,
messages: {
userName: errorMessages.E2
}
});
if(validator.form()){
// form submition code
}
}
Thanks