javascript probleme floating point in french
Brought to you by:
acarmichael,
t_shelley
hello
on the xprocess web server, the javascript check the flating value for a task but in french localization there is a problem
in english, a floating point is xxx.xx
in french, it is xxx,xx
i have change the regex value to check
SEARCH in js file
var anum=/(^\d+$)|(^\d+\.\d+$)|(^\d+\.+$)|(^\.+\d+$)/;
REPLACE by
var anum=/(^\d+$)|(^\d+[.,]\d+$)|(^\d+[.,]+$)|(^[.,]+\d+$)/;
Thanks for reporting this. We'll investigate.
I've made the changes in all the Javascripts were we used it. The problem is that now in the UK if I enter 1,2 it will allow it but on save it throws a numberformatexception stack-trace to the browser.
A better solution is to somehow ask something for the decimal character in the current locale in the Javascript. This would be the ideal solution. I'm not sure if this can be done.
Fixed in v3.2
Needs to be tested on different locales...
Reopened - on further reflection a better implementation needs to be looked into - how in Javascript can be get the decimal place locale character?