views:

575

answers:

2

Hi all, I have a JSP page which accepts user string in more than 23 languages.So a user in English gives 8.5 the javascript function should accept as well as user from Russia gives 8,5 it also should be accepted it as valid input. In this scenario how do we validate in Javascript for all the languages

+1  A: 

You can probably do this server side with Java using java.text.NumberFormat, but Dojo has code to do this client side. See dojo.number and dijit.form.NumberTextBox which uses dojo.number.

peller