Permalink
Browse files

Fix maxLength error

1 parent aaf5264 commit 72ea52ff4c3f5266316f9d5e3f46b2fa2ed0285d @jaridmargolin jaridmargolin committed Nov 19, 2013
Showing with 17 additions and 10 deletions.
  1. +2 −2 lib/formatter.js
  2. +2 −2 lib/formatter.min.js
  3. +2 −2 lib/jquery.formatter.js
  4. +2 −2 lib/jquery.formatter.min.js
  5. +1 −1 package.json
  6. +1 −1 src/formatter.js
  7. +7 −0 test/formatter.js
View
@@ -1,5 +1,5 @@
/*!
- * v0.0.8
+ * v0.0.9
* Copyright (c) 2013 First Opinion
* formatter.js is open sourced under the MIT license.
*
@@ -334,7 +334,7 @@ Formatter.prototype._validateInpts = function () {
// Checks
var isBadType = !inptRegs[inptType],
- isInvalid = !inptRegs[inptType].test(this.val.charAt(i)),
+ isInvalid = !isBadType && !inptRegs[inptType].test(this.val.charAt(i)),
inBounds = this.inpts[i];
// Remove if incorrect and inbounds
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,5 +1,5 @@
/*!
- * v0.0.8
+ * v0.0.9
* Copyright (c) 2013 First Opinion
* formatter.js is open sourced under the MIT license.
*
@@ -330,7 +330,7 @@ Formatter.prototype._validateInpts = function () {
// Checks
var isBadType = !inptRegs[inptType],
- isInvalid = !inptRegs[inptType].test(this.val.charAt(i)),
+ isInvalid = !isBadType && !inptRegs[inptType].test(this.val.charAt(i)),
inBounds = this.inpts[i];
// Remove if incorrect and inbounds
Oops, something went wrong.

0 comments on commit 72ea52f

Please sign in to comment.