|
|
@@ -3,7 +3,7 @@
|
|
|
* http://github.com/RobinHerbots/jquery.inputmask
|
|
|
* Copyright (c) 2010 - 2013 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 2.3.67
|
|
|
+* Version: 2.3.68
|
|
|
*/
|
|
|
|
|
|
(function ($) {
|
|
|
@@ -1641,14 +1641,14 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2013 Robin Herbots
|
|
|
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-Version: 2.3.67
|
|
|
+Version: 2.3.68
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
(function ($) {
|
|
|
//extra definitions
|
|
|
$.extend($.inputmask.defaults.definitions, {
|
|
|
- 'A': {
|
|
|
+ 'A': {
|
|
|
validator: "[A-Za-z]",
|
|
|
cardinality: 1,
|
|
|
casing: "upper" //auto uppercasing
|
|
|
@@ -1723,16 +1723,36 @@ Optional extensions on the jquery.inputmask base
|
|
|
insertMode: false,
|
|
|
autoUnmask: false
|
|
|
},
|
|
|
- "ip": {
|
|
|
- mask: "i.i.i.i",
|
|
|
+ "ip": { //ip-adress mask
|
|
|
+ mask: ["[[x]y]z.[[x]y]z.[[x]y]z.x[yz]", "[[x]y]z.[[x]y]z.[[x]y]z.[[x]y][z]"],
|
|
|
definitions: {
|
|
|
- 'i': {
|
|
|
- validator: "25[0-5]|2[0-4][0-9]|[01][0-9][0-9]",
|
|
|
- cardinality: 3,
|
|
|
- prevalidator: [
|
|
|
- { validator: "[0-2]", cardinality: 1 },
|
|
|
- { validator: "2[0-5]|[01][0-9]", cardinality: 2 }
|
|
|
- ]
|
|
|
+ 'x': {
|
|
|
+ validator: "[012]",
|
|
|
+ cardinality: 1,
|
|
|
+ definitionSymbol: "i"
|
|
|
+ },
|
|
|
+ 'y': {
|
|
|
+ validator: function (chrs, buffer, pos, strict, opts) {
|
|
|
+ if (pos - 1 > -1 && buffer[pos - 1] != ".")
|
|
|
+ chrs = buffer[pos - 1] + chrs;
|
|
|
+ else chrs = "0" + chrs;
|
|
|
+ return new RegExp("2[0-5]|[01][0-9]").test(chrs);
|
|
|
+ },
|
|
|
+ cardinality: 1,
|
|
|
+ definitionSymbol: "i"
|
|
|
+ },
|
|
|
+ 'z': {
|
|
|
+ validator: function (chrs, buffer, pos, strict, opts) {
|
|
|
+ if (pos - 1 > -1 && buffer[pos - 1] != ".") {
|
|
|
+ chrs = buffer[pos - 1] + chrs;
|
|
|
+ if (pos - 2 > -1 && buffer[pos - 2] != ".") {
|
|
|
+ chrs = buffer[pos - 2] + chrs;
|
|
|
+ } else chrs = "0" + chrs;
|
|
|
+ } else chrs = "00" + chrs;
|
|
|
+ return new RegExp("25[0-5]|2[0-4][0-9]|[01][0-9][0-9]").test(chrs);
|
|
|
+ },
|
|
|
+ cardinality: 1,
|
|
|
+ definitionSymbol: "i"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -1743,7 +1763,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2012 Robin Herbots
|
|
|
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-Version: 2.3.67
|
|
|
+Version: 2.3.68
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -2227,7 +2247,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2013 Robin Herbots
|
|
|
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-Version: 2.3.67
|
|
|
+Version: 2.3.68
|
|
|
|
|
|
Optional extensions on the jquery.inputmask base
|
|
|
*/
|
|
|
@@ -2404,7 +2424,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2013 Robin Herbots
|
|
|
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-Version: 2.3.67
|
|
|
+Version: 2.3.68
|
|
|
|
|
|
Regex extensions on the jquery.inputmask base
|
|
|
Allows for using regular expressions as a mask
|
|
|
@@ -2574,7 +2594,7 @@ Input Mask plugin extensions
|
|
|
http://github.com/RobinHerbots/jquery.inputmask
|
|
|
Copyright (c) 2010 - 2013 Robin Herbots
|
|
|
Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-Version: 2.3.67
|
|
|
+Version: 2.3.68
|
|
|
|
|
|
Phone extension.
|
|
|
When using this extension make sure you specify the correct url to get the masks
|