Numbers and decimal separator

Aug 16, 2011 at 4:44 PM
Edited Aug 16, 2011 at 4:44 PM

I am trying to use LessThenOrEqualTo attribute, with decimal numbers. Our application uses coma as decimal separator, what I think is problem for client side validation.

For example i compare to number -80, when I enter 80 LessThenOrEqualTo dont show error which is correct, but when I enter 80,00 error appears. Is it possible to set somehow that I am using coma instead dot. It can be fixed this way

var isNumeric = function (input) {
a = a.replace(",", ".");
return (input - 0) == input && input.length > 0; };

...

    else if (isNumeric(value1)) {
        value1 = parseFloat(value1.replace(",", "."));
        value2 = parseFloat(value2.replace(",", "."));
    }

but I must remember to change it on every mvcfoolproof update

kubiix