Robin Herbots 10 years ago
parent
commit
9ea1f9096b

+ 2 - 0
CHANGELOG.md

@@ -14,6 +14,8 @@ All notable changes to this project will be documented in this file.
 - update files to be included for package.json, bower.json, component.json
 
 ### Fixed
+- IsValid on Optional Mask returning false #1055
+- Focus loop on IE9 with numeric.extensions #989
 - Currency with autogroup and no digits not working #1062
 - field input width characters cropped while writing #1060 (regression fix)
 - DependencyLib error in Internet Explorer #1047

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "jquery.inputmask",
-  "version": "3.2.1-134",
+  "version": "3.2.1-137",
   "main": [
     "./dist/inputmask/inputmask.dependencyLib.jquery.js",
     "./dist/inputmask/inputmask.js",

+ 1 - 1
component.json

@@ -2,7 +2,7 @@
   "name": "jquery_inputmask",
   "repository": "robinherbots/jquery.inputmask",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
-  "version": "3.2.1-134",
+  "version": "3.2.1-137",
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "main": "./dist/jquery.inputmask.bundle.js",
   "scripts": [

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
   "name": "robinherbots/jquery.inputmask",
   "description": "jquery.inputmask is a jquery plugin which create an input mask.",
-  "version": "3.2.1-134",
+  "version": "3.2.1-137",
   "type": "library",
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "homepage": "http://robinherbots.github.io/jquery.inputmask",

+ 6 - 6
dist/inputmask/inputmask.date.extensions.js

@@ -3,10 +3,10 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function(factory) {
-    "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
+    "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
 }(function($, Inputmask) {
     return Inputmask.extendDefinitions({
         h: {
@@ -97,7 +97,7 @@
                 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
                     var today = new Date();
                     $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString()), 
-                    $input.triggerHandler("setvalue.inputmask");
+                    $input.trigger("setvalue.inputmask");
                 }
             },
             getFrontValue: function(mask, buffer, opts) {
@@ -270,7 +270,7 @@
                 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
                     var today = new Date();
                     $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), 
-                    $input.triggerHandler("setvalue.inputmask");
+                    $input.trigger("setvalue.inputmask");
                 }
             }
         },
@@ -284,7 +284,7 @@
                 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
                     var today = new Date();
                     $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString()), 
-                    $input.triggerHandler("setvalue.inputmask");
+                    $input.trigger("setvalue.inputmask");
                 }
             }
         },
@@ -445,7 +445,7 @@
                 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
                     var today = new Date();
                     $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), 
-                    $input.triggerHandler("setvalue.inputmask");
+                    $input.trigger("setvalue.inputmask");
                 }
             }
         },

+ 1 - 1
dist/inputmask/inputmask.dependencyLib.jquery.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery")) : factory(jQuery);

+ 6 - 6
dist/inputmask/inputmask.extensions.js

@@ -3,10 +3,10 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function(factory) {
-    "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
+    "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
 }(function($, Inputmask) {
     return Inputmask.extendDefinitions({
         A: {
@@ -56,7 +56,7 @@
                                         j + 1 - chrs.length > 0 && (tmp = maskset.buffer.join("").substring(0, j + 1 - chrs.length) + "" + tmp);
                                         var isValid = opts.regex["urlpre" + (j + 1)].test(tmp);
                                         if (!strict && !isValid) {
-                                            for (pos -= j, k = 0; k < opts.defaultPrefix.length; k++) maskset.buffer[pos] = opts.defaultPrefix[k], 
+                                            for (pos -= j, k = 0; k < opts.defaultPrefix.length; k++) maskset.buffer[pos] = opts.defaultPrefix[k],
                                             pos++;
                                             for (k = 0; k < tmp.length - 1; k++) maskset.buffer[pos] = tmp[k], pos++;
                                             return {
@@ -86,8 +86,8 @@
             definitions: {
                 i: {
                     validator: function(chrs, maskset, pos, strict, opts) {
-                        return pos - 1 > -1 && "." !== maskset.buffer[pos - 1] ? (chrs = maskset.buffer[pos - 1] + chrs, 
-                        chrs = pos - 2 > -1 && "." !== maskset.buffer[pos - 2] ? maskset.buffer[pos - 2] + chrs : "0" + chrs) : chrs = "00" + chrs, 
+                        return pos - 1 > -1 && "." !== maskset.buffer[pos - 1] ? (chrs = maskset.buffer[pos - 1] + chrs,
+                        chrs = pos - 2 > -1 && "." !== maskset.buffer[pos - 2] ? maskset.buffer[pos - 2] + chrs : "0" + chrs) : chrs = "00" + chrs,
                         new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs);
                     },
                     cardinality: 1
@@ -112,4 +112,4 @@
             mask: "##:##:##:##:##:##"
         }
     }), Inputmask;
-});
+});

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


+ 4 - 4
dist/inputmask/inputmask.numeric.extensions.js

@@ -3,10 +3,10 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function(factory) {
-    "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
+    "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
 }(function($, Inputmask) {
     return Inputmask.extendAliases({
         numeric: {
@@ -390,11 +390,11 @@
                 var $input = $(this);
                 if (e.ctrlKey) switch (e.keyCode) {
                   case Inputmask.keyCode.UP:
-                    $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)), $input.triggerHandler("setvalue.inputmask");
+                    $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)), $input.trigger("setvalue.inputmask");
                     break;
 
                   case Inputmask.keyCode.DOWN:
-                    $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)), $input.triggerHandler("setvalue.inputmask");
+                    $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)), $input.trigger("setvalue.inputmask");
                 }
             }
         },

+ 3 - 3
dist/inputmask/inputmask.phone.extensions.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
@@ -34,7 +34,7 @@
             nojumpsThreshold: 1,
             onBeforeMask: function(value, opts) {
                 var processedValue = value.replace(/^0/g, "");
-                return (processedValue.indexOf(opts.countrycode) > 1 || -1 === processedValue.indexOf(opts.countrycode)) && (processedValue = "+" + opts.countrycode + processedValue), 
+                return (processedValue.indexOf(opts.countrycode) > 1 || -1 === processedValue.indexOf(opts.countrycode)) && (processedValue = "+" + opts.countrycode + processedValue),
                 processedValue;
             }
         },
@@ -45,4 +45,4 @@
             nojumpsThreshold: 4
         }
     }), Inputmask;
-});
+});

+ 2 - 2
dist/inputmask/inputmask.regex.extensions.js

@@ -3,10 +3,10 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function(factory) {
-    "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
+    "function" == typeof define && define.amd ? define([ "inputmask.dependencyLib", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);
 }(function($, Inputmask) {
     return Inputmask.extendAliases({
         Regex: {

+ 1 - 1
dist/inputmask/jquery.inputmask.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function(factory) {
     "function" == typeof define && define.amd ? define([ "jquery", "inputmask" ], factory) : "object" == typeof exports ? module.exports = factory(require("jquery"), require("./inputmask")) : factory(jQuery, window.Inputmask);

+ 7 - 7
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function($) {
     function Inputmask(alias, options) {
@@ -1505,7 +1505,7 @@
                 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
                     var today = new Date();
                     $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString()), 
-                    $input.triggerHandler("setvalue.inputmask");
+                    $input.trigger("setvalue.inputmask");
                 }
             },
             getFrontValue: function(mask, buffer, opts) {
@@ -1678,7 +1678,7 @@
                 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
                     var today = new Date();
                     $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), 
-                    $input.triggerHandler("setvalue.inputmask");
+                    $input.trigger("setvalue.inputmask");
                 }
             }
         },
@@ -1692,7 +1692,7 @@
                 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
                     var today = new Date();
                     $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString()), 
-                    $input.triggerHandler("setvalue.inputmask");
+                    $input.trigger("setvalue.inputmask");
                 }
             }
         },
@@ -1853,7 +1853,7 @@
                 if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
                     var today = new Date();
                     $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), 
-                    $input.triggerHandler("setvalue.inputmask");
+                    $input.trigger("setvalue.inputmask");
                 }
             }
         },
@@ -2403,11 +2403,11 @@
                 var $input = $(this);
                 if (e.ctrlKey) switch (e.keyCode) {
                   case Inputmask.keyCode.UP:
-                    $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)), $input.triggerHandler("setvalue.inputmask");
+                    $input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step)), $input.trigger("setvalue.inputmask");
                     break;
 
                   case Inputmask.keyCode.DOWN:
-                    $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)), $input.triggerHandler("setvalue.inputmask");
+                    $input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step)), $input.trigger("setvalue.inputmask");
                 }
             }
         },

File diff suppressed because it is too large
+ 2 - 2
dist/min/inputmask/inputmask.date.extensions.min.js


+ 1 - 1
dist/min/inputmask/inputmask.dependencyLib.jquery.min.js

@@ -3,6 +3,6 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2015 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 3.2.1-134
+* Version: 3.2.1-137
 */
 !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){return window.dependencyLib=a,a});

File diff suppressed because it is too large
+ 2 - 2
dist/min/inputmask/inputmask.extensions.min.js


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


File diff suppressed because it is too large
+ 2 - 2
dist/min/inputmask/inputmask.numeric.extensions.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/min/inputmask/inputmask.phone.extensions.min.js


File diff suppressed because it is too large
+ 2 - 2
dist/min/inputmask/inputmask.regex.extensions.min.js


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


+ 10 - 7
extra/dependencyLibs/inputmask.dependencyLib.js

@@ -40,15 +40,19 @@
 				typeof obj;
 		}
 
+		function isWindow(obj) {
+			return obj != null && obj === obj.window;
+		}
+
 		function isArraylike(obj) {
 			// Support: iOS 8.2 (not reproducible in simulator)
 			// `in` check used to prevent JIT error (gh-2145)
 			// hasOwn isn't used here due to false negatives
 			// regarding Nodelist length in IE
 			var length = "length" in obj && obj.length,
-				type = jQuery.type(obj);
+				ltype = type(obj);
 
-			if (type === "function" || jQuery.isWindow(obj)) {
+			if (ltype === "function" || isWindow(obj)) {
 				return false;
 			}
 
@@ -56,7 +60,7 @@
 				return true;
 			}
 
-			return type === "array" || length === 0 ||
+			return ltype === "array" || length === 0 ||
 				typeof length === "number" && length > 0 && (length - 1) in obj;
 		}
 
@@ -270,15 +274,14 @@
 			return arr == null ? -1 : indexOf(arr, elem, i);
 		};
 		DependencyLib.valHooks = undefined;
-		DependencyLib.isWindow = function(obj) {
-			return obj != null && obj === obj.window;
-		};
+
+
 		DependencyLib.isPlainObject = function(obj) {
 			// Not plain objects:
 			// - Any object or value whose internal [[Class]] property is not "[object Object]"
 			// - DOM nodes
 			// - window
-			if (type(obj) !== "object" || obj.nodeType || DependencyLib.isWindow(obj)) {
+			if (type(obj) !== "object" || obj.nodeType || isWindow(obj)) {
 				return false;
 			}
 

+ 6 - 6
js/inputmask.date.extensions.js

@@ -9,9 +9,9 @@ Optional extensions on the jquery.inputmask base
 */
 (function(factory) {
 		if (typeof define === "function" && define.amd) {
-			define(["jquery", "inputmask"], factory);
+			define(["inputmask.dependencyLib", "inputmask"], factory);
 		} else if (typeof exports === "object") {
-			module.exports = factory(require("jquery"), require("./inputmask"));
+			module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask"));
 		} else {
 			factory(jQuery, window.Inputmask);
 		}
@@ -115,7 +115,7 @@ Optional extensions on the jquery.inputmask base
 					if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
 						var today = new Date();
 						$input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString());
-						$input.triggerHandler("setvalue.inputmask");
+						$input.trigger("setvalue.inputmask");
 					}
 				},
 				getFrontValue: function(mask, buffer, opts) {
@@ -372,7 +372,7 @@ Optional extensions on the jquery.inputmask base
 					if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
 						var today = new Date();
 						$input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString());
-						$input.triggerHandler("setvalue.inputmask");
+						$input.trigger("setvalue.inputmask");
 					}
 				}
 			},
@@ -386,7 +386,7 @@ Optional extensions on the jquery.inputmask base
 					if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
 						var today = new Date();
 						$input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString());
-						$input.triggerHandler("setvalue.inputmask");
+						$input.trigger("setvalue.inputmask");
 					}
 				}
 			},
@@ -595,7 +595,7 @@ Optional extensions on the jquery.inputmask base
 					if (e.ctrlKey && e.keyCode === Inputmask.keyCode.RIGHT) {
 						var today = new Date();
 						$input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()),
-						$input.triggerHandler("setvalue.inputmask");
+						$input.trigger("setvalue.inputmask");
 					}
 				}
   			},

+ 2 - 2
js/inputmask.extensions.js

@@ -9,9 +9,9 @@ Optional extensions on the jquery.inputmask base
 */
 (function(factory) {
 		if (typeof define === "function" && define.amd) {
-			define(["jquery", "inputmask"], factory);
+			define(["inputmask.dependencyLib", "inputmask"], factory);
 		} else if (typeof exports === "object") {
-			module.exports = factory(require("jquery"), require("./inputmask"));
+			module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask"));
 		} else {
 			factory(jQuery, window.Inputmask);
 		}

+ 1 - 1
js/inputmask.js

@@ -9,7 +9,7 @@
 		if (typeof define === "function" && define.amd) {
 			define(["inputmask.dependencyLib"], factory);
 		} else if (typeof exports === "object") {
-			module.exports = factory(require("./inputmask.dependencyLib"));
+			module.exports = factory(require("./inputmask.dependencyLib.jquery"));
 		} else {
 			factory(window.dependencyLib || jQuery);
 		}

+ 4 - 4
js/inputmask.numeric.extensions.js

@@ -9,9 +9,9 @@ Optional extensions on the jquery.inputmask base
 */
 (function(factory) {
 		if (typeof define === "function" && define.amd) {
-			define(["jquery", "inputmask"], factory);
+			define(["inputmask.dependencyLib", "inputmask"], factory);
 		} else if (typeof exports === "object") {
-			module.exports = factory(require("jquery"), require("./inputmask"));
+			module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask"));
 		} else {
 			factory(jQuery, window.Inputmask);
 		}
@@ -693,11 +693,11 @@ Optional extensions on the jquery.inputmask base
 						switch (e.keyCode) {
 							case Inputmask.keyCode.UP:
 								$input.val(parseFloat(this.inputmask.unmaskedvalue()) + parseInt(opts.step));
-								$input.triggerHandler("setvalue.inputmask");
+								$input.trigger("setvalue.inputmask");
 								break;
 							case Inputmask.keyCode.DOWN:
 								$input.val(parseFloat(this.inputmask.unmaskedvalue()) - parseInt(opts.step));
-								$input.triggerHandler("setvalue.inputmask");
+								$input.trigger("setvalue.inputmask");
 								break;
 						}
 					}

+ 2 - 2
js/inputmask.regex.extensions.js

@@ -10,9 +10,9 @@ Allows for using regular expressions as a mask
 */
 (function(factory) {
 		if (typeof define === "function" && define.amd) {
-			define(["jquery", "inputmask"], factory);
+			define(["inputmask.dependencyLib", "inputmask"], factory);
 		} else if (typeof exports === "object") {
-			module.exports = factory(require("jquery"), require("./inputmask"));
+			module.exports = factory(require("./inputmask.dependencyLib.jquery"), require("./inputmask"));
 		} else {
 			factory(jQuery, window.Inputmask);
 		}

+ 1 - 1
package.json

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

+ 0 - 1
qunit/main.js

@@ -8,7 +8,6 @@ define([
 	"prototypeExtensions",
 	"simulator"
 ], function(qunit) {
-	jQuery.noConflict();
 	// start QUnit.
 	qunit.load();
 	qunit.start();

+ 218 - 151
qunit/tests_formatvalidate.js

@@ -3,155 +3,222 @@ define([
 	"inputmask.dependencyLib",
 	"inputmask"
 ], function(qunit, $, Inputmask) {
-module("Value formatting");
-test("Inputmask.format(\"2331973\", { alias: \"date\"})", function () {
-    var formattedValue = Inputmask.format("2331973", { alias: "date" });
-    equal(formattedValue, "23/03/1973", "Result " + formattedValue);
-});
-
-test("Inputmask.format(\"016501030020001DE1015170\", { mask: \"99 999 999 999 9999 \\D\\E*** 9999\"})", function () {
-    var formattedValue = Inputmask.format("016501030020001DE1015170", { mask: "99 999 999 999 9999 \\D\\E*** 9999" });
-    equal(formattedValue, "01 650 103 002 0001 DE101 5170", "Result " + formattedValue);
-});
-
-test("Inputmask.format(\"12\", {  mask: \"$ 999999\", numericInput: true, placeholder: \"0\" }); - gigermocas", function () {
-    var formattedValue = Inputmask.format("12", { mask: "$ 999999", numericInput: true, placeholder: "0" });
-    equal(formattedValue, "$ 000012", "Result " + formattedValue);
-});
-
-
-test("Inputmask.format(\"1111111.11\" - ... autoGroup: true - swd120", function () {
-    var formattedValue = Inputmask.format("1111111.11", {
-        alias: "decimal",
-        radixPoint: ".",
-        digits: 2,
-        autoGroup: true,
-        groupSeparator: ",",
-        groupSize: 3,
-        allowMinus: true
-    });
-    equal(formattedValue, "1,111,111.11", "Result " + formattedValue);
-});
-
-test("Inputmask.format(phone, { mask: '(999) 999-9999' })); - krivaten", function () {
-    var phone = '5551112222';
-    var formattedValue = Inputmask.format(phone, { mask: '(999) 999-9999' });
-    equal(formattedValue, "(555) 111-2222", "Result " + formattedValue);
-});
-
-
-module("Value Validating");
-test("Inputmask.isValid(\"23/03/1973\", { alias: \"date\"})", function () {
-    var isValid = Inputmask.isValid("23/03/1973", { alias: "date" });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("Inputmask.isValid(\"01 650 103 002 0001 DE101 5170\", { mask: \"99 999 999 999 9999 \\D\\E*** 9999\"})", function () {
-    var isValid = Inputmask.isValid("01 650 103 002 0001 DE101 5170", { mask: "99 999 999 999 9999 \\D\\E*** 9999" });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("Inputmask.isValid email => false", function () {
-    var isValid = Inputmask.isValid("some.body@mail.c", { alias: "email" });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("Inputmask.isValid email => true", function () {
-    var isValid = Inputmask.isValid("some.body@mail.com", { alias: "email" });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("Inputmask.isValid email greedy => false", function () {
-    var isValid = Inputmask.isValid("some.body@mail.c", { alias: "email", greedy: true });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("Inputmask.isValid email greedy => true", function () {
-    var isValid = Inputmask.isValid("some.body@mail.com", { alias: "email", greedy: true });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("YoussefTaghlabi isValid(\"100\", { alias: \"integer\" }", function () {
-    var isValid = Inputmask.isValid("100", { alias: "integer" });
-    equal(isValid, true, "Result " + isValid);
-});
-test("YoussefTaghlabi isValid(\"100.00\", { alias: \"integer\" }", function () {
-    var isValid = Inputmask.isValid("100.00", { alias: "integer" });
-    equal(isValid, false, "Result " + isValid);
-});
-test("YoussefTaghlabi isValid(\"123\", { alias: \"decimal\" }", function () {
-    var isValid = Inputmask.isValid("123", { alias: "decimal" });
-    equal(isValid, true, "Result " + isValid);
-});
-test("YoussefTaghlabi isValid(\"123.45\", { alias: \"decimal\" }", function () {
-    var isValid = Inputmask.isValid("123.45", { alias: "decimal" });
-    equal(isValid, true, "Result " + isValid);
-});
-test("YoussefTaghlabi isValid(\"123456.78\", { alias: \"decimal\" }", function () {
-    var isValid = Inputmask.isValid("123456.78", { alias: "decimal" });
-    equal(isValid, true, "Result " + isValid);
-});
-test("YoussefTaghlabi isValid(\"123,456.78\", { alias: \"decimal\" }", function () {
-    var isValid = Inputmask.isValid("123,456.78", {
-        alias: "decimal", radixPoint: ".",
-        groupSeparator: ",",
-        groupSize: 3
-    });
-    equal(isValid, true, "Result " + isValid);
-});
-test("YoussefTaghlabi isValid(\"12,\", { alias: \"decimal\" }", function () {
-    var isValid = Inputmask.isValid("12,", {
-        alias: "decimal", radixPoint: ".",
-        groupSeparator: ",",
-        groupSize: 3
-    });
-    equal(isValid, false, "Result " + isValid);
-});
-test("YoussefTaghlabi isValid(\"12,1.45\", { alias: \"decimal\" }", function () {
-    var isValid = Inputmask.isValid("12,1.45", {
-        alias: "decimal", radixPoint: ".",
-        groupSeparator: ",",
-        groupSize: 3
-    });
-    equal(isValid, false, "Result " + isValid);
-});
-test("YoussefTaghlabi isValid(\"12,345.67\", { alias: \"decimal\" }", function () {
-    var isValid = Inputmask.isValid("12,345.67", {
-        alias: "decimal", radixPoint: ".",
-        groupSeparator: ",",
-        groupSize: 3
-    });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("thomstark isValid(\"12lbs\", {mask:\"99[9]lb\\s\", greedy:false, skipOptionalPartCharacter: \"\", \"clearIncomplete\":true}", function () {
-    var isValid = Inputmask.isValid("12lbs", { mask: "99[9]lb\\s", greedy: false, skipOptionalPartCharacter: "", "clearIncomplete": true });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("thomstark isValid(\"1'2\"\", {mask:\"9'9[9]\"\", greedy:false, skipOptionalPartCharacter: \"\", \"clearIncomplete\":true}", function () {
-    var isValid = Inputmask.isValid("1'2\"", { mask: "9'9[9]\"", greedy: false, skipOptionalPartCharacter: "", "clearIncomplete": true });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("thomstark isValid(\"12lbs\", {mask:\"99{1,2}lb\\s\", greedy:false, skipOptionalPartCharacter: \"\", \"clearIncomplete\":true}", function () {
-    var isValid = Inputmask.isValid("12lbs", { mask: "99{1,2}lb\\s", greedy: false, skipOptionalPartCharacter: "", "clearIncomplete": true });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("thomstark isValid(\"9'9{1,2}\", {mask:\"9'9[9]\"\", greedy:false, skipOptionalPartCharacter: \"\", \"clearIncomplete\":true}", function () {
-    var isValid = Inputmask.isValid("1'2\"", { mask: "9'9{1,2}\"", greedy: false, skipOptionalPartCharacter: "", "clearIncomplete": true });
-    equal(isValid, true, "Result " + isValid);
-});
-
-test("a13x3y isValid(\"some_body@mail.com\", {alias:\"email\"}", function () {
-    var isValid = Inputmask.isValid("some_body@mail.com", { alias: "email" });
-    equal(isValid, true, "Result " + isValid);
-});
-
-module("Value unmasking");
-test("inputmask.unmask(\"23/03/1973\", { alias: \"dd/mm/yyyy\" })", function () {
-    var unmasked = Inputmask.unmask("23/03/1973", { alias: "dd/mm/yyyy" });
-    equal(unmasked, "23031973", "Result " + unmasked);
-});
+	module("Value formatting");
+	test("Inputmask.format(\"2331973\", { alias: \"date\"})", function() {
+		var formattedValue = Inputmask.format("2331973", {
+			alias: "date"
+		});
+		equal(formattedValue, "23/03/1973", "Result " + formattedValue);
+	});
+
+	test("Inputmask.format(\"016501030020001DE1015170\", { mask: \"99 999 999 999 9999 \\D\\E*** 9999\"})", function() {
+		var formattedValue = Inputmask.format("016501030020001DE1015170", {
+			mask: "99 999 999 999 9999 \\D\\E*** 9999"
+		});
+		equal(formattedValue, "01 650 103 002 0001 DE101 5170", "Result " + formattedValue);
+	});
+
+	test("Inputmask.format(\"12\", {  mask: \"$ 999999\", numericInput: true, placeholder: \"0\" }); - gigermocas", function() {
+		var formattedValue = Inputmask.format("12", {
+			mask: "$ 999999",
+			numericInput: true,
+			placeholder: "0"
+		});
+		equal(formattedValue, "$ 000012", "Result " + formattedValue);
+	});
+
+
+	test("Inputmask.format(\"1111111.11\" - ... autoGroup: true - swd120", function() {
+		var formattedValue = Inputmask.format("1111111.11", {
+			alias: "decimal",
+			radixPoint: ".",
+			digits: 2,
+			autoGroup: true,
+			groupSeparator: ",",
+			groupSize: 3,
+			allowMinus: true
+		});
+		equal(formattedValue, "1,111,111.11", "Result " + formattedValue);
+	});
+
+	test("Inputmask.format(phone, { mask: '(999) 999-9999' })); - krivaten", function() {
+		var phone = '5551112222';
+		var formattedValue = Inputmask.format(phone, {
+			mask: '(999) 999-9999'
+		});
+		equal(formattedValue, "(555) 111-2222", "Result " + formattedValue);
+	});
+
+
+	module("Value Validating");
+	test("Inputmask.isValid(\"23/03/1973\", { alias: \"date\"})", function() {
+		var isValid = Inputmask.isValid("23/03/1973", {
+			alias: "date"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("Inputmask.isValid(\"01 650 103 002 0001 DE101 5170\", { mask: \"99 999 999 999 9999 \\D\\E*** 9999\"})", function() {
+		var isValid = Inputmask.isValid("01 650 103 002 0001 DE101 5170", {
+			mask: "99 999 999 999 9999 \\D\\E*** 9999"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("Inputmask.isValid email => false", function() {
+		var isValid = Inputmask.isValid("some.body@mail.c", {
+			alias: "email"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("Inputmask.isValid email => true", function() {
+		var isValid = Inputmask.isValid("some.body@mail.com", {
+			alias: "email"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("Inputmask.isValid email greedy => false", function() {
+		var isValid = Inputmask.isValid("some.body@mail.c", {
+			alias: "email",
+			greedy: true
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("Inputmask.isValid email greedy => true", function() {
+		var isValid = Inputmask.isValid("some.body@mail.com", {
+			alias: "email",
+			greedy: true
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("YoussefTaghlabi isValid(\"100\", { alias: \"integer\" }", function() {
+		var isValid = Inputmask.isValid("100", {
+			alias: "integer"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+	test("YoussefTaghlabi isValid(\"100.00\", { alias: \"integer\" }", function() {
+		var isValid = Inputmask.isValid("100.00", {
+			alias: "integer"
+		});
+		equal(isValid, false, "Result " + isValid);
+	});
+	test("YoussefTaghlabi isValid(\"123\", { alias: \"decimal\" }", function() {
+		var isValid = Inputmask.isValid("123", {
+			alias: "decimal"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+	test("YoussefTaghlabi isValid(\"123.45\", { alias: \"decimal\" }", function() {
+		var isValid = Inputmask.isValid("123.45", {
+			alias: "decimal"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+	test("YoussefTaghlabi isValid(\"123456.78\", { alias: \"decimal\" }", function() {
+		var isValid = Inputmask.isValid("123456.78", {
+			alias: "decimal"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+	test("YoussefTaghlabi isValid(\"123,456.78\", { alias: \"decimal\" }", function() {
+		var isValid = Inputmask.isValid("123,456.78", {
+			alias: "decimal",
+			radixPoint: ".",
+			groupSeparator: ",",
+			groupSize: 3
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+	test("YoussefTaghlabi isValid(\"12,\", { alias: \"decimal\" }", function() {
+		var isValid = Inputmask.isValid("12,", {
+			alias: "decimal",
+			radixPoint: ".",
+			groupSeparator: ",",
+			groupSize: 3
+		});
+		equal(isValid, false, "Result " + isValid);
+	});
+	test("YoussefTaghlabi isValid(\"12,1.45\", { alias: \"decimal\" }", function() {
+		var isValid = Inputmask.isValid("12,1.45", {
+			alias: "decimal",
+			radixPoint: ".",
+			groupSeparator: ",",
+			groupSize: 3
+		});
+		equal(isValid, false, "Result " + isValid);
+	});
+	test("YoussefTaghlabi isValid(\"12,345.67\", { alias: \"decimal\" }", function() {
+		var isValid = Inputmask.isValid("12,345.67", {
+			alias: "decimal",
+			radixPoint: ".",
+			groupSeparator: ",",
+			groupSize: 3
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("thomstark isValid(\"12lbs\", {mask:\"99[9]lb\\s\", greedy:false, skipOptionalPartCharacter: \"\", \"clearIncomplete\":true}", function() {
+		var isValid = Inputmask.isValid("12lbs", {
+			mask: "99[9]lb\\s",
+			greedy: false,
+			skipOptionalPartCharacter: "",
+			"clearIncomplete": true
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("thomstark isValid(\"1'2\"\", {mask:\"9'9[9]\"\", greedy:false, skipOptionalPartCharacter: \"\", \"clearIncomplete\":true}", function() {
+		var isValid = Inputmask.isValid("1'2\"", {
+			mask: "9'9[9]\"",
+			greedy: false,
+			skipOptionalPartCharacter: "",
+			"clearIncomplete": true
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("thomstark isValid(\"12lbs\", {mask:\"99{1,2}lb\\s\", greedy:false, skipOptionalPartCharacter: \"\", \"clearIncomplete\":true}", function() {
+		var isValid = Inputmask.isValid("12lbs", {
+			mask: "99{1,2}lb\\s",
+			greedy: false,
+			skipOptionalPartCharacter: "",
+			"clearIncomplete": true
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("thomstark isValid(\"9'9{1,2}\", {mask:\"9'9[9]\"\", greedy:false, skipOptionalPartCharacter: \"\", \"clearIncomplete\":true}", function() {
+		var isValid = Inputmask.isValid("1'2\"", {
+			mask: "9'9{1,2}\"",
+			greedy: false,
+			skipOptionalPartCharacter: "",
+			"clearIncomplete": true
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("a13x3y isValid(\"some_body@mail.com\", {alias:\"email\"}", function() {
+		var isValid = Inputmask.isValid("some_body@mail.com", {
+			alias: "email"
+		});
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	test("Inputmask(\"99-99[ 99/99]\").isValid(\"03-11\") - pricejt", function() {
+		var isValid = Inputmask("99-99[ 99/99]").isValid("03-11");
+		equal(isValid, true, "Result " + isValid);
+	});
+
+	module("Value unmasking");
+	test("inputmask.unmask(\"23/03/1973\", { alias: \"dd/mm/yyyy\" })", function() {
+		var unmasked = Inputmask.unmask("23/03/1973", {
+			alias: "dd/mm/yyyy"
+		});
+		equal(unmasked, "23031973", "Result " + unmasked);
+	});
 });