views:

241

answers:

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.

+2  A: 

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

Robert Harvey
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.
Melursus
Only the example provided at the link above validates the whole form. The selector can be anything you want, including a single field.
Robert Harvey