PDA

View Full Version : Form validation



pak
Aug 13th, 2004, 04:54 AM
Hi

For form validation: is it possible to display mulitple error messages for a single field?

For example, for creating a "user" there are some rules for a password - it must be longer than 6 characters, and not the same as the username etc.

What if the person enters "abc", which is the same as the username, and shorter then 6 characters. Is it possible to "reject" both these errors and have 2 error messages displayed on the JSP for the password field?

Thanks,
Peter

davison
Aug 13th, 2004, 07:14 AM
yes, it's possible. What problems did you encounter with it?

pak
Aug 13th, 2004, 08:09 AM
Thanks, as soon as I saw the post saying it was possible, I realised I was only seeing one error message for my field because I was not looping through the error object on the jsp...

Peter