Browse Source

some fix in intellicheck for phone mask

Robin Herbots 11 years ago
parent
commit
97fc26fadf

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.0.74",
+  "version": "3.0.75",
   "main": [
     "./dist/inputmask/jquery.inputmask.js",
     "./dist/inputmask/jquery.inputmask.extensions.js",

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 3
 build.minor = 0
-build.revision = 74
+build.revision = 75
 
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js

File diff suppressed because it is too large
+ 40 - 40
dist/inputmask/jquery.inputmask.js


+ 9 - 10
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2014 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.0.74
+* Version: 3.0.75
 */
 
 (function (factory) {
@@ -800,8 +800,7 @@
                                                     }
                                                 }
                                                 possibilityPos.locator[alternation] = possibilities; //reset forceddecision ~ needed for proper delete
-
-                                                var isValidRslt = isValid(pos, c, strict, fromSetValid);
+                                                var isValidRslt = getLastValidPosition() + 1 == pos && isValid(pos, c, strict, fromSetValid);
                                                 opts.keepStatic = !opts.keepStatic; //enable keepStatic on getMaskLength
                                                 if (!isValidRslt) {
                                                     resetMaskSet();
@@ -821,9 +820,9 @@
                 //Check for a nonmask before the pos
                 var buffer = getBuffer();
                 for (var pndx = pos - 1; pndx > -1; pndx--) {
-                    if (getMaskSet()["validPositions"][pndx] && getMaskSet()["validPositions"][pndx].fn == null)
+                    if (getMaskSet()["validPositions"][pndx] && getMaskSet()["validPositions"][pndx]["match"].fn == null)
                         break;
-                    else if ((!isMask(pndx) || buffer[pndx] != getPlaceholder(pndx)) && getTests(pndx).length > 1) {
+                    else if (getMaskSet()["validPositions"][pndx] == undefined && (!isMask(pndx) || buffer[pndx] != getPlaceholder(pndx)) && getTests(pndx).length > 1) {
                         _isValid(pndx, buffer[pndx], true);
                     }
                 }
@@ -1969,7 +1968,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.74
+Version: 3.0.75
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2097,7 +2096,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.74
+Version: 3.0.75
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2593,7 +2592,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.74
+Version: 3.0.75
 
 Optional extensions on the jquery.inputmask base
 */
@@ -2853,7 +2852,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.74
+Version: 3.0.75
 
 Regex extensions on the jquery.inputmask base
 Allows for using regular expressions as a mask
@@ -3047,7 +3046,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2014 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 3.0.74
+Version: 3.0.75
 
 Phone extension.
 When using this extension make sure you specify the correct url to get the masks

File diff suppressed because it is too large
+ 48 - 48
dist/jquery.inputmask.bundle.min.js


+ 1 - 1
jquery.inputmask.jquery.json

@@ -8,7 +8,7 @@
 		"inputmask",
 		"mask"
     ],
-    "version": "3.0.74",
+    "version": "3.0.75",
     "author": {
         "name": "Robin Herbots",
         "url": "http://github.com/RobinHerbots/jquery.inputmask"

+ 3 - 4
js/jquery.inputmask.js

@@ -800,8 +800,7 @@
                                                     }
                                                 }
                                                 possibilityPos.locator[alternation] = possibilities; //reset forceddecision ~ needed for proper delete
-
-                                                var isValidRslt = isValid(pos, c, strict, fromSetValid);
+                                                var isValidRslt = getLastValidPosition() + 1 == pos && isValid(pos, c, strict, fromSetValid);
                                                 opts.keepStatic = !opts.keepStatic; //enable keepStatic on getMaskLength
                                                 if (!isValidRslt) {
                                                     resetMaskSet();
@@ -821,9 +820,9 @@
                 //Check for a nonmask before the pos
                 var buffer = getBuffer();
                 for (var pndx = pos - 1; pndx > -1; pndx--) {
-                    if (getMaskSet()["validPositions"][pndx] && getMaskSet()["validPositions"][pndx].fn == null)
+                    if (getMaskSet()["validPositions"][pndx] && getMaskSet()["validPositions"][pndx]["match"].fn == null)
                         break;
-                    else if ((!isMask(pndx) || buffer[pndx] != getPlaceholder(pndx)) && getTests(pndx).length > 1) {
+                    else if (getMaskSet()["validPositions"][pndx] == undefined && (!isMask(pndx) || buffer[pndx] != getPlaceholder(pndx)) && getTests(pndx).length > 1) {
                         _isValid(pndx, buffer[pndx], true);
                     }
                 }

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.0.74",
+  "version": "3.0.75",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
   "main": [
     "./dist/inputmask/jquery.inputmask.js",