|
|
@@ -67,7 +67,7 @@ Optional extensions on the jquery.inputmask base
|
|
|
validator: function(chrs, buffer, pos, strict, opts) {
|
|
|
var isValid = opts.regex.val1.test(chrs);
|
|
|
if (!strict && !isValid) {
|
|
|
- if (chrs.charAt(1) == opts.separator[opts.separator.length - 1]) {
|
|
|
+ if (chrs.charAt(1) == opts.separator.charAt(opts.separator.length - 1)) {
|
|
|
isValid = opts.regex.val1.test("0" + chrs.charAt(0));
|
|
|
if (isValid) {
|
|
|
buffer[pos - 1] = "0";
|
|
|
@@ -98,7 +98,7 @@ Optional extensions on the jquery.inputmask base
|
|
|
var frontValue = buffer.join('').substr(0, 3);
|
|
|
var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);
|
|
|
if (!strict && !isValid) {
|
|
|
- if (chrs.charAt(1) == opts.separator[opts.separator.length - 1]) {
|
|
|
+ if (chrs.charAt(1) == opts.separator.charAt(opts.separator.length - 1)) {
|
|
|
isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0));
|
|
|
if (isValid) {
|
|
|
buffer[pos - 1] = "0";
|
|
|
@@ -205,7 +205,7 @@ Optional extensions on the jquery.inputmask base
|
|
|
var frontValue = buffer.join('').substr(5, 3);
|
|
|
var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);
|
|
|
if (!strict && !isValid) {
|
|
|
- if (chrs.charAt(1) == opts.separator[opts.separator.length - 1]) {
|
|
|
+ if (chrs.charAt(1) == opts.separator.charAt(opts.separator.length - 1)) {
|
|
|
isValid = opts.regex.val2(opts.separator).test(frontValue + "0" + chrs.charAt(0));
|
|
|
if (isValid) {
|
|
|
buffer[pos - 1] = "0";
|