Joakim,

there has been quite some discussion on this already and there also exists a JIRA issue for this. Maybe you want to contribute there: https://issues.apache.org/jira/browse/TAP5-211 Please also sign up for JIRA and vote for it.

Cheers,

Uli

Joakim Olsson schrieb:
Hi,

I have a need for locale-aware number validation in my app (since Sweden
use comma as decimal-separator instead of dot) and therefor I created my
own DoubleTranslator and FloatTranslator that I contributed to the
TranslatorSource from my module.

Since it would have been nice to also have client validation working in
a locale-aware manner I decided to take it a step further. :-D

Please find attached a patch towards 5.0.19-SNAPSHOT which adds support
for both client- and server-side locale-aware number-validation.

I have the number of decimals fixed to two in the translators since I
need to use it for monetary input. This should be nice to be able to
configure per field in some way.

I have placed the regexp for the client-side validation in the
ValidationMessages.properties-file which might be the wrong place to
have it.

There is probably also a need to look at the regular expressions that
are currently setup to make sure that they are correct for the various
locales.

Best regards,
Joakim



------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to