struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nguyenlinh <>
Subject Re: RequiredFieldValidator and error message from property file via key
Date Sun, 06 Dec 2009 22:09:34 GMT

I found the solution now.
Just override invalid.fieldvalue.<field-name> in your properties file.
for example:

invalid.fieldvalue.aField=Ivalid value for "aField".

Thanks a lot, your answer got me on the right track.

Greg Lindholm-2 wrote:
> You may have a different problem then you think;
> The @RequiredFieldValidator does not make any sense on a int
> (primitive) field as an int cannot be null. The validation interceptor
> checks the values on the fields after params interceptor sets the
> fields. The RequiredFieldValidator checks if the field is null which
> will never be the case for a primitive field.

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message