struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gemes Tibor <...@i-trade.hu>
Subject Re: [validator] numbers with localized decimal separator
Date Wed, 15 Jan 2003 21:25:54 GMT
2003-01-15, sze keltezéssel Rod McChesney ezt írta:
> Sorry, I didn't understand that the javascript validation was
> the problem. It does seem like the Java validator code should
> be locale-sensitive, but that's a separate question.

both

> Since javascript number parsing does not handle locales, I guess
> one approach would be to treat everything as a regex mask
> instead of using the numeric validators, and include a
> hashtable mapping from locale to expected pattern. The script
> would look up the proper mask based on the locale. The locale
> would also have to be stuck into the javascript as a variable.
> I think that's similar to what you said, but would leave the
> number in its native state.

I was trying to say exactly the same but I failed. I think that most
locales has the '.' separator, so I think that it is enough if the
not-'.'-separator locales are stored in the script. 

Sorry for my weak english. 

Tib


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


Mime
View raw message