|
|
@@ -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.1.64-174
|
|
|
+* Version: 3.1.64-175
|
|
|
*/
|
|
|
!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);
|
|
|
@@ -56,8 +56,8 @@
|
|
|
suffix: "",
|
|
|
rightAlign: !0,
|
|
|
decimalProtect: !0,
|
|
|
- min: void 0,
|
|
|
- max: void 0,
|
|
|
+ min: null,
|
|
|
+ max: null,
|
|
|
step: 1,
|
|
|
insertMode: !0,
|
|
|
autoUnmask: !1,
|
|
|
@@ -246,8 +246,8 @@
|
|
|
processValue = processValue.replace(new RegExp("^" + Inputmask.escapeRegex(opts.negationSymbol.front)), "-"),
|
|
|
processValue = processValue.replace(new RegExp(Inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""),
|
|
|
processValue = processValue === opts.negationSymbol.front ? processValue + "0" : processValue,
|
|
|
- isFinite(processValue) && (isFinite(opts.max) && (isValid = parseFloat(processValue) <= parseFloat(opts.max)),
|
|
|
- isValid && isFinite(opts.min) && (0 >= processValue || processValue.toString().length >= opts.min.toString().length) && (isValid = parseFloat(processValue) >= parseFloat(opts.min),
|
|
|
+ isFinite(processValue) && (null !== opts.max && isFinite(opts.max) && (isValid = parseFloat(processValue) <= parseFloat(opts.max)),
|
|
|
+ isValid && null !== opts.min && isFinite(opts.min) && (0 >= processValue || processValue.toString().length >= opts.min.toString().length) && (isValid = parseFloat(processValue) >= parseFloat(opts.min),
|
|
|
isValid || (isValid = $.extend(!0, {
|
|
|
refreshFromBuffer: !0,
|
|
|
buffer: (opts.prefix + opts.min).split("")
|
|
|
@@ -373,11 +373,13 @@
|
|
|
}
|
|
|
var buffer = [];
|
|
|
for (var vp in maskset.validPositions) void 0 !== maskset.validPositions[vp].input && buffer.push(maskset.validPositions[vp].input);
|
|
|
- if (radixInjection && delete maskset.validPositions[radixPos], radixPos > 0 && (matchRslt = buffer.join("").match(opts.regex.integerNPart(opts)),
|
|
|
- matchRslt && radixPos >= position)) if (0 === matchRslt[0].indexOf("0")) canClear = matchRslt.index !== position || "0" === opts.placeholder; else {
|
|
|
- var intPart = parseInt(matchRslt[0].replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), ""));
|
|
|
- 10 > intPart && maskset.validPositions[position] && "0" !== opts.placeholder && (maskset.validPositions[position].input = "0",
|
|
|
- maskset.p = opts.prefix.length + 1, canClear = !1);
|
|
|
+ if (radixInjection && delete maskset.validPositions[radixPos], radixPos > 0) {
|
|
|
+ var bufVal = buffer.join("");
|
|
|
+ if (matchRslt = bufVal.match(opts.regex.integerNPart(opts)), matchRslt && radixPos >= position) if (0 === matchRslt[0].indexOf("0")) canClear = matchRslt.index !== position || "0" === opts.placeholder; else {
|
|
|
+ var intPart = parseInt(matchRslt[0].replace(new RegExp(Inputmask.escapeRegex(opts.groupSeparator), "g"), "")), radixPart = parseInt(bufVal.split(opts.radixPoint)[1]);
|
|
|
+ 10 > intPart && maskset.validPositions[position] && ("0" !== opts.placeholder || radixPart > 0) && (maskset.validPositions[position].input = "0",
|
|
|
+ maskset.p = opts.prefix.length + 1, canClear = !1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return canClear;
|