A little bit of context:
I'm using the jQuery Validation plugin to validate a sign-up form. I now want to implement an ajax call to check whether the user name is available in the system, and I want to make this ajax call only if the userName value is a valid one as per the rules set in $(form).validate();
I want something like:
$("#userName").keyup(function () {
if ($("#userName").isValid()) {
//make ajax called
}
});
I searched the documentation but i couldn't identify the solution to my problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…