Error messages for multiple validators

"Ming Fai" <[email protected]>
Newsgroups gmane.comp.java.mvc.devel
Organization Basebeans.com
Message-ID <[email protected]>
Hi,

In the validator sample web application, when there are two validators (e.g.
required, mask ) for a field, the second validator is not functional until
the first validator of *all other fields* are satisfied. Take an example,
let's consider only the firstName and email fields of the registrationForm.

1. When both fields are not filled, 'required' error messages for both
fields are shown. <- CORRECT
2. When an incorrect email is filled, and the firstName field is left blank,
only error message "First Name is requierd" is shown. There is no error
message for 'email' even the filled email value is invalid (according to the
2nd validator). It shows the 2nd validator is not called. <- INCORRECT
3. When both firstName and email are filled, but with incorrect values,
error messages are shown. <- CORRECT

Is there an alternative solution to enforce validation for all specified
validator for each field, independent of other fields?

I use Struts 1.1b2. Please let me know if I have not explained the case
clearly.

regards,
mingfai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.