LA_
LA_

Reputation: 20429

How to check if the field is passed validation?

I use jquery validate plugin to verify what user input into the field. At the same time, I capture focusout event and action there:

$('input[type="text"]').focusout(function() {
...
});

But I don't want to do this action when validation is not passed. How to check it there?

Upvotes: 1

Views: 1450

Answers (1)

Rafay
Rafay

Reputation: 31043

you can use the valid method

if($("#inputField").valid()){
 //do something
}

Upvotes: 3

Related Questions