You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ming Fai <mi...@hongkong.com> on 2002/09/16 12:19:41 UTC

error message for multiple validators

Hi,

In the validator sample web application, it seems that 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 a 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


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>