1

With the JQuery Validation Plugin is it possible to print 'Ok' when the field is correct? When there's an error, I can show a customizable error message. Is the same thing possible when there's no error in the field and it's content is valid (I mean it's not empty) ?

UPDATE

Here's an example of what I want to achieve : Example. When the value of the field is correct, a checkbox image appear at the right of the field.

0

1 Answer 1

2

You can use the Plugin's valid() method to see if the field validates, and display your message if it returns true.

http://docs.jquery.com/Plugins/Validation/valid

Sign up to request clarification or add additional context in comments.

2 Comments

This function validate the whole form. What I would like is to validate each field individually. Ideally, I would like to have something as easy as to add error message.
Only the example provided at the link above validates the whole form. The selector can be anything you want, including a single field.

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.