jquery - How to clear validation errors and submit at once? -


i have form jquery validation. when enter value error, show error , adds border css.

then enter valid value , hit submit button, instead of submitting directly, first erases error message , waits me hit submit button again.

how can manage clear errors , submit @ once?

enter image description here

enter image description here

you can use example form; if need more send codes.

$(function () {             $("#registerform").validate({                 errorelement: "span",                 errorclass: "help-block",                 validclass: "has-success",                 rules: {                     email: {                         required: true,                         email: true,                     }                 },                 messages: {                     email: "wrong mail!",                 },                 highlight: function(element, errorclass, validclass)                 {                     $(element).closest(".form-group").addclass("has-error").removeclass("has-success");                 },                 unhighlight: function(element, errorclass, validclass)                 {                     $(element).closest(".form-group").removeclass("has-error").addclass("has-success");                 }             });         }); 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -