You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Casey Link <ca...@outskirtslabs.com> on 2016/05/18 11:34:14 UTC

Overriding and translating JSR-303 validation messages

G'day,

In tapestry < 5.4 the validation messages for JSR-303 lived at

org / apache / tapestry5 / internal / ValidationMessages.properties

In tapestry 5.4 however, I cannot find the properties file that contains
these messages.

Could someone kindly point me in the right direction? I'd like to
localize them as well as override a few in english ("may not be null"
isn't very user friendly).

Best,

-- 
Casey Link

Outskirts Labs { https://outskirtslabs.com }
Technology for Changemakers


Re: Overriding and translating JSR-303 validation messages

Posted by Ido Dovrat <id...@gmail.com>.
Or just go ahead and add these overriding properties to app.properties.

On Wed, May 18, 2016 at 7:44 PM, Kalle Korhonen <ka...@gmail.com>
wrote:

> You should be able to override them by adding a
> ValidationMessages.properties file at the root of your classpath. See
>
> https://github.com/apache/tapestry-5/blob/master/tapestry-beanvalidator/src/test/resources/ValidationMessages_en.properties
> for examples.
>
> Kalle
>
> On Wed, May 18, 2016 at 4:34 AM, Casey Link <ca...@outskirtslabs.com>
> wrote:
>
> > G'day,
> >
> > In tapestry < 5.4 the validation messages for JSR-303 lived at
> >
> > org / apache / tapestry5 / internal / ValidationMessages.properties
> >
> > In tapestry 5.4 however, I cannot find the properties file that contains
> > these messages.
> >
> > Could someone kindly point me in the right direction? I'd like to
> > localize them as well as override a few in english ("may not be null"
> > isn't very user friendly).
> >
> > Best,
> >
> > --
> > Casey Link
> >
> > Outskirts Labs { https://outskirtslabs.com }
> > Technology for Changemakers
> >
> >
>

Re: Overriding and translating JSR-303 validation messages

Posted by Kalle Korhonen <ka...@gmail.com>.
You should be able to override them by adding a
ValidationMessages.properties file at the root of your classpath. See
https://github.com/apache/tapestry-5/blob/master/tapestry-beanvalidator/src/test/resources/ValidationMessages_en.properties
for examples.

Kalle

On Wed, May 18, 2016 at 4:34 AM, Casey Link <ca...@outskirtslabs.com> wrote:

> G'day,
>
> In tapestry < 5.4 the validation messages for JSR-303 lived at
>
> org / apache / tapestry5 / internal / ValidationMessages.properties
>
> In tapestry 5.4 however, I cannot find the properties file that contains
> these messages.
>
> Could someone kindly point me in the right direction? I'd like to
> localize them as well as override a few in english ("may not be null"
> isn't very user friendly).
>
> Best,
>
> --
> Casey Link
>
> Outskirts Labs { https://outskirtslabs.com }
> Technology for Changemakers
>
>