struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nguyenlinh <nguyenlinh.m...@gmail.com>
Subject Re: RequiredFieldValidator and error message from property file via key
Date Sun, 06 Dec 2009 21:22:29 GMT

Hello,
I have the same problem. So what kind of validator should I use if I have a
field of type int and I want to make sure the user typed a number?
Thanks,
Linh


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: http://old.nabble.com/RequiredFieldValidator-and-error-message-from-property-file-via-key-tp26640581p26669216.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message