Browse Source

fix initial value beginning with 0

Robin Herbots 12 years ago
parent
commit
d3073264d5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      js/jquery.inputmask.numeric.extensions.js

+ 1 - 1
js/jquery.inputmask.numeric.extensions.js

@@ -96,7 +96,7 @@ Optional extensions on the jquery.inputmask base
                 '~': { //real number
                     validator: function (chrs, buffer, pos, strict, opts) {
                         if (chrs == "") return false;
-                        if (pos <= 1 && buffer[0] === '0' && new RegExp("[\\d-]").test(chrs)) { //handle first char
+                        if (!strict && pos <= 1 && buffer[0] === '0' && new RegExp("[\\d-]").test(chrs)) { //handle first char
                             buffer[0] = "";
                             return { "pos": 0 };
                         }