I was about to suggest the same thing as Massimo. It's a trivial change to 
the regex; I think the following works:

if (! this.value.match(/^[+-]?[0-9]*[.,]?[0-9]*$/)) {

I like the simplicity of this method, even if it doesn't provide perfect 
client-side validation. Getting data about arbitrary separators injected 
into class names or elsewhere in the javascript code wouldn't be be terribly 
difficult, but the complications may not be worth the minimal potential 
gains.

Kevin

Reply via email to