You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Yohan Yudanara <yo...@gmail.com> on 2012/01/14 09:45:59 UTC

Override error text "You must provide a numeric value for %s"

Hi,

I want to ask a question. How to override default error message "You must
provide a numeric value for fieldname" when we input alphabet into numeric
textfield?

I've tried using this values on page properties file:
fieldname-integer-format-exception-message = no alphabet
fieldname-numberformat-message = no alphabet
but the error message still saying "You must provide a numeric value for
bla bla bla"

Thanks in advance.

Best regards,
Yohan Yudanara

Re: Override error text "You must provide a numeric value for %s"

Posted by Yohan Yudanara <yo...@gmail.com>.
Hi,

I'm sorry, just ignore my question.
I've found the solution after reading tapestry source code.

We can override default NumericTranslator message using this key on page
properties file:
fieldname-[type]-message=bla bla bla

where [type] could be one of:
byte, short, integer, long, float, double, biginteger, bigdecimal

Thanks..

Best regards,
Yohan Yudanara

On Sat, Jan 14, 2012 at 3:45 PM, Yohan Yudanara <yo...@gmail.com>wrote:

> Hi,
>
> I want to ask a question. How to override default error message "You must
> provide a numeric value for fieldname" when we input alphabet into numeric
> textfield?
>
> I've tried using this values on page properties file:
> fieldname-integer-format-exception-message = no alphabet
> fieldname-numberformat-message = no alphabet
> but the error message still saying "You must provide a numeric value for
> bla bla bla"
>
> Thanks in advance.
>
> Best regards,
> Yohan Yudanara
>