Browse Source

fix repeat

Robin Herbots 12 years ago
parent
commit
67891fb63e

BIN
dist/jQuery.InputMask.2.2.63.nupkg


BIN
dist/jQuery.InputMask.2.2.64.nupkg


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

@@ -21,7 +21,7 @@
                 oncomplete: $.noop, //executes when the mask is complete
                 oncomplete: $.noop, //executes when the mask is complete
                 onincomplete: $.noop, //executes when the mask is incomplete and focus is lost
                 onincomplete: $.noop, //executes when the mask is incomplete and focus is lost
                 oncleared: $.noop, //executes when the mask is cleared
                 oncleared: $.noop, //executes when the mask is cleared
-                repeat: "*", //repetitions of the mask: * ~ forever, otherwise specify an integer
+                repeat: 0, //repetitions of the mask: * ~ forever, otherwise specify an integer
                 greedy: true, //true: allocated buffer for the mask and repetitions - false: allocate only if needed
                 greedy: true, //true: allocated buffer for the mask and repetitions - false: allocate only if needed
                 autoUnmask: false, //automatically unmask when retrieving the value with $.fn.val or value if the browser supports __lookupGetter__ or getOwnPropertyDescriptor
                 autoUnmask: false, //automatically unmask when retrieving the value with $.fn.val or value if the browser supports __lookupGetter__ or getOwnPropertyDescriptor
                 clearMaskOnLostFocus: true,
                 clearMaskOnLostFocus: true,
@@ -2218,7 +2218,7 @@ Allows for using regular expressions as a mask
         'Regex': {
         'Regex': {
             mask: "r",
             mask: "r",
             greedy: false,
             greedy: false,
-            repeat: 10, //needs to be computed
+            repeat: "*",
             regex: null,
             regex: null,
             regexSplit: null,
             regexSplit: null,
             definitions: {
             definitions: {

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


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


+ 1 - 1
dist/min/jquery.inputmask.regex.extensions.js

@@ -1 +1 @@
-(function(b){b.extend(b.inputmask.defaults.aliases,{Regex:{mask:"r",greedy:!1,repeat:10,regex:null,regexSplit:null,definitions:{r:{validator:function(f,a,c,d,e){null==e.regexSplit&&(e.regexSplit=e.regex.match(RegExp("\\[.*?]\\*","g")));var b=a.slice(),a="",d=!1;b.splice(c,0,f);f=b.join("");for(c=0;c<e.regexSplit.length&&!(a+=e.regexSplit[c],d=RegExp("^"+a+"$").test(f),console.log(f+" "+d+" "+a),d);c++);return d},cardinality:1}}}})})(jQuery);
+(function(b){b.extend(b.inputmask.defaults.aliases,{Regex:{mask:"r",greedy:!1,repeat:"*",regex:null,regexSplit:null,definitions:{r:{validator:function(f,a,c,d,e){null==e.regexSplit&&(e.regexSplit=e.regex.match(RegExp("\\[.*?]\\*","g")));var b=a.slice(),a="",d=!1;b.splice(c,0,f);f=b.join("");for(c=0;c<e.regexSplit.length&&!(a+=e.regexSplit[c],d=RegExp("^"+a+"$").test(f),console.log(f+" "+d+" "+a),d);c++);return d},cardinality:1}}}})})(jQuery);

+ 1 - 1
js/jquery.inputmask.js

@@ -21,7 +21,7 @@
                 oncomplete: $.noop, //executes when the mask is complete
                 oncomplete: $.noop, //executes when the mask is complete
                 onincomplete: $.noop, //executes when the mask is incomplete and focus is lost
                 onincomplete: $.noop, //executes when the mask is incomplete and focus is lost
                 oncleared: $.noop, //executes when the mask is cleared
                 oncleared: $.noop, //executes when the mask is cleared
-                repeat: "*", //repetitions of the mask: * ~ forever, otherwise specify an integer
+                repeat: 0, //repetitions of the mask: * ~ forever, otherwise specify an integer
                 greedy: true, //true: allocated buffer for the mask and repetitions - false: allocate only if needed
                 greedy: true, //true: allocated buffer for the mask and repetitions - false: allocate only if needed
                 autoUnmask: false, //automatically unmask when retrieving the value with $.fn.val or value if the browser supports __lookupGetter__ or getOwnPropertyDescriptor
                 autoUnmask: false, //automatically unmask when retrieving the value with $.fn.val or value if the browser supports __lookupGetter__ or getOwnPropertyDescriptor
                 clearMaskOnLostFocus: true,
                 clearMaskOnLostFocus: true,