You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Struts2 Fan <st...@gmail.com> on 2007/05/03 22:20:08 UTC

[S2] How to change "Invalid field value for field" message in tr

Hi all,

When a form is submitted if there is an integer value and the user enters a
non-integer value, it gives the error "Invalid field value for field ......"
I want to define it for locale tr
I just couldn't find where to create a new file or where to add the bundles
for them.

Thanks in advance.
-- 
View this message in context: http://www.nabble.com/-S2--How-to-change-%22Invalid-field-value-for-field%22-message-in-tr-tf3688720.html#a10312377
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


Re: [S2] How to change "Invalid field value for field" message intr

Posted by Rene Gielen <gi...@it-neering.net>.
Forgot to mention:
http://struts.apache.org/2.x/docs/type-conversion.html

at the very end ...

Am Fr, 4.05.2007, 12:14, schrieb Rene Gielen:
> On Thu, 3 May 2007 22:29:26 -0700 (PDT), Struts2 Fan
> <st...@gmail.com> wrote:
>>
>> Yes I checked them. I didn't write any validation for these fields.
>> Struts
>> 2
>> controls double, int, date fields and if they are not valid it writes
>> the
>> message "Invalid field value for field "property.intValue" . I couldn't
>> find
>> where the message is defined. So I couldn't write the message for
>> Turkish
>> locale.
>>
>> Here is the error message displayed. I didn't write anything for
>> validation.
>> It is a "integer" type field.
>> http://www.nabble.com/file/8209/invalidFieldError.JPG
>>
>>
>
> To provide your own conversion error message for a specific field, you
> will have to provide a resource message following the naming convention
>
> invalid.fieldvalue.yourpropertyname
>
> This should override the default message.
>
> - Rene
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



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


Re: [S2] How to change "Invalid field value for field" message intr

Posted by Rene Gielen <gi...@it-neering.net>.
On Thu, 3 May 2007 22:29:26 -0700 (PDT), Struts2 Fan <st...@gmail.com> wrote:
> 
> Yes I checked them. I didn't write any validation for these fields. Struts
> 2
> controls double, int, date fields and if they are not valid it writes the
> message "Invalid field value for field "property.intValue" . I couldn't
> find
> where the message is defined. So I couldn't write the message for Turkish
> locale.
> 
> Here is the error message displayed. I didn't write anything for
> validation.
> It is a "integer" type field.
> http://www.nabble.com/file/8209/invalidFieldError.JPG
> 
> 

To provide your own conversion error message for a specific field, you will have to provide a resource message following the naming convention

invalid.fieldvalue.yourpropertyname

This should override the default message.

- Rene


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


Re: [S2] How to change "Invalid field value for field" message in tr

Posted by Struts2 Fan <st...@gmail.com>.
Yes I checked them. I didn't write any validation for these fields. Struts 2
controls double, int, date fields and if they are not valid it writes the
message "Invalid field value for field "property.intValue" . I couldn't find
where the message is defined. So I couldn't write the message for Turkish
locale.

Here is the error message displayed. I didn't write anything for validation.
It is a "integer" type field.
http://www.nabble.com/file/8209/invalidFieldError.JPG 


-- 
View this message in context: http://www.nabble.com/-S2--How-to-change-%22Invalid-field-value-for-field%22-message-in-tr-tf3688720.html#a10317222
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


Re: [S2] How to change "Invalid field value for field" message in tr

Posted by Laurie Harper <la...@holoweb.net>.
Struts2 Fan wrote:
> Hi all,
> 
> When a form is submitted if there is an integer value and the user enters a
> non-integer value, it gives the error "Invalid field value for field ......"
> I want to define it for locale tr
> I just couldn't find where to create a new file or where to add the bundles
> for them.

Did you check the documentation for localization of S2 apps, and the 
validation docs?

http://struts.apache.org/2.x/docs/localization.html
http://struts.apache.org/2.x/docs/validation.html

L.


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