3

I have a textbox on which I have made an onblur script that takes the input and converts it into a date. I'm using jQuery validate-plugin to validate the input, but the problem is that the input from the user is often not valid until I've parsed it, which makes the automatic validation that jQuery validation makes, both redundant and unwanted.

How can I stop jQuery validate from validating automatically so I can run it only on demand?

2 Answers 2

5
$('#aspnetForm').validate({
       onfocusout: false,
       onkeyup: false,
       onclick: false
});
Sign up to request clarification or add additional context in comments.

Comments

1

From the Validate options page:

Disables onblur validation.

$(".selector").validate({
   onfocusout: false
})

1 Comment

I happened upon the answer in a link in an answer to this question: stackoverflow.com/questions/2707436/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.