Re: RequiredFieldValidator and error message from property file via key

2009-12-06 Thread nguyenlinh
I found the solution now. Just override invalid.fieldvalue. 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 @Req

Re: RequiredFieldValidator and error message from property file via key

2009-12-06 Thread nguyenlinh
I found the @ConversionErrorFieldValidator and it works almost the way I wanted. Now I get my error message but I also get the default struts error message which is: Invalid field value for field "". Is there any "simple" way I can get rid of the default message from struts? Thanks nguyenlinh wr

Re: RequiredFieldValidator and error message from property file via key

2009-12-06 Thread nguyenlinh
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

Re: RequiredFieldValidator and error message from property file via key

2009-12-04 Thread Greg Lindholm
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 fi