struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [S1] Validator does not respect locale when validating double value?
Date Fri, 18 Jan 2013 18:55:42 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

On 1/18/13 1:02 PM, Christopher Schultz wrote:
> Before I go digging-through the code Struts/commons-validator to
> find out exactly what might be wrong, can anyone give me any
> suggestions at to what I might be missing?

Actually, it didn't take a lot of digging:

http://svn.apache.org/viewvc/struts/struts1/tags/STRUTS_1_3_10/core/src/main/java/org/apache/struts/validator/FieldChecks.java?view=markup

The method validateDouble() totally ignores the user's Locale and
calls commons-validator's formatDouble(String) method instead of the
formatDouble(String,Locale) method.

The same seems to be true for all the validate[NumberType] methods and
validate[NumberType]Range methods.

This seems to be an i18n bug to me. Am I missing something?

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlD5mq4ACgkQ9CaO5/Lv0PC8eACeLQwIIKTeKRovTsVjQL5J0Xzk
VygAoJUjB9SIHmSjI3PuYIw5kJhbQjc3
=REQ5
-----END PGP SIGNATURE-----

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


Mime
View raw message