2
votes

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!

1
Why would you want to notify the user about just one error? - Dan Herbert
Is this a plugin or are you writing your own validation code? - wdm
+1 to Dan: this is a frustrating, non user-friendly design. - Demian Brecht
if ... else if ... else if ... else "all good". - wdm

1 Answers

1
votes

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