Browse Source

Replace ',' with '.' to validate decimal numbers correct.

Johan Rönn 11 years ago
parent
commit
e05a96b99a
3 changed files with 3 additions and 0 deletions
  1. 1 0
      src/js/validator/between.js
  2. 1 0
      src/js/validator/greaterThan.js
  3. 1 0
      src/js/validator/lessThan.js

+ 1 - 0
src/js/validator/between.js

@@ -47,6 +47,7 @@
             if (value === '') {
                 return true;
             }
+			value = value.replace(',','.');
             if (!$.isNumeric(value)) {
                 return false;
             }

+ 1 - 0
src/js/validator/greaterThan.js

@@ -44,6 +44,7 @@
             if (value === '') {
                 return true;
             }
+			value = value.replace(',','.');
             if (!$.isNumeric(value)) {
                 return false;
             }

+ 1 - 0
src/js/validator/lessThan.js

@@ -44,6 +44,7 @@
             if (value === '') {
                 return true;
             }
+			value = value.replace(',','.');
             if (!$.isNumeric(value)) {
                 return false;
             }