|
|
@@ -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.62-11
|
|
|
+* Version: 3.1.62-12
|
|
|
*/
|
|
|
!function(factory) {
|
|
|
"function" == typeof define && define.amd ? define([ "jquery", "./jquery.inputmask" ], factory) : factory(jQuery);
|
|
|
@@ -88,8 +88,11 @@
|
|
|
if (e && "blur" == e.type) {
|
|
|
var maskedValue = buffer.join(""), processValue = maskedValue.replace(opts.prefix, "");
|
|
|
if (processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
|
|
|
- processValue = processValue.replace($.inputmask.escapeRegex(opts.radixPoint), "."),
|
|
|
- isFinite(processValue) && isFinite(opts.min) && parseFloat(processValue) < parseFloat(opts.min)) return opts.postFormat((opts.prefix + opts.min).split(""), 0, !0, opts);
|
|
|
+ "," === opts.radixPoint && (processValue = processValue.replace($.inputmask.escapeRegex(opts.radixPoint), ".")),
|
|
|
+ isFinite(processValue) && isFinite(opts.min) && parseFloat(processValue) < parseFloat(opts.min)) return $.extend(!0, {
|
|
|
+ refreshFromBuffer: !0,
|
|
|
+ buffer: (opts.prefix + opts.min).split("")
|
|
|
+ }, opts.postFormat((opts.prefix + opts.min).split(""), 0, !0, opts));
|
|
|
var tmpBufSplit = "" != opts.radixPoint ? buffer.join("").split(opts.radixPoint) : [ buffer.join("") ], matchRslt = tmpBufSplit[0].match(opts.regex.integerPart(opts)), matchRsltDigits = 2 == tmpBufSplit.length ? tmpBufSplit[1].match(opts.regex.integerNPart(opts)) : void 0;
|
|
|
!matchRslt || matchRslt[0] != opts.negationSymbol.front + "0" && matchRslt[0] != opts.negationSymbol.front && "+" != matchRslt[0] || void 0 != matchRsltDigits && !matchRsltDigits[0].match(/^0+$/) || buffer.splice(matchRslt.index, 1);
|
|
|
var radixPosition = $.inArray(opts.radixPoint, buffer);
|
|
|
@@ -205,7 +208,7 @@
|
|
|
postValidation: function(buffer, opts) {
|
|
|
var isValid = !0, maskedValue = buffer.join(""), processValue = maskedValue.replace(opts.prefix, "");
|
|
|
return processValue = processValue.replace(opts.suffix, ""), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), "g"), ""),
|
|
|
- processValue = processValue.replace($.inputmask.escapeRegex(opts.radixPoint), "."),
|
|
|
+ "," === opts.radixPoint && (processValue = processValue.replace($.inputmask.escapeRegex(opts.radixPoint), ".")),
|
|
|
processValue = processValue.replace(new RegExp("^" + $.inputmask.escapeRegex(opts.negationSymbol.front)), "-"),
|
|
|
processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.negationSymbol.back) + "$"), ""),
|
|
|
isFinite(processValue) && isFinite(opts.max) && (isValid = parseFloat(processValue) <= parseFloat(opts.max)),
|