Ribamar
Ribamar

Reputation: 21

jQuery Validation: show one message per time

I have a form with these fields: Name, E-mail and Password. If the user clicks on "submit" button, then the jQuery Validation displays 3 error messages, asking the user to fill each field.

Is there some way to display only one message "per time"?

If the user forgot to fill all the three fields, then I'd like to display one message, asking him to fill "Name" field.

If the user forgot to fill only "E-mail" and "Password" fields, then I'd like to display one message, asking him to fill "E-mail" field.

I don't know if it's clear. I hope some one help me.

Thank you!

Upvotes: 2

Views: 824

Answers (1)

Grooveek
Grooveek

Reputation: 10094

Check the docs of the plugin, you have a groups method which can help you

Upvotes: 1

Related Questions