Skip to content

Commit

Permalink
Bump versioN
Browse files Browse the repository at this point in the history
  • Loading branch information
fernahh committed Mar 17, 2016
1 parent be5d914 commit 888119a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "creditcard.js",
"description": "A simple library for credit-card validation in JavaScript",
"main": "dist/creditcard.min.js",
"version": "2.0.2",
"version": "2.0.3",
"authors": [
"@ContaAzul"
],
Expand Down
9 changes: 3 additions & 6 deletions dist/creditcard.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* creditcard.js v2.0.2
* creditcard.js v2.0.3
* Created by @ContaAzul.
*
* Licensed MIT.
Expand Down Expand Up @@ -56,18 +56,15 @@ var CreditCard = function () {
var numberLength = undefined;

numberLength = brand === 'Amex' ? 4 : 3;
var regex = new RegExp('[0-9]{' + numberLength + '}');
var regex = new RegExp('^[0-9]{' + numberLength + '}$');

return code.length === numberLength && regex.test(code);
return regex.test(code);
}
}, {
key: 'isExpirationDateValid',
value: function isExpirationDateValid(month, year) {
var m = month;
var y = year;
var yearLength = y.length;

if (yearLength < 2 && yearLength > 4) return false;

m = parseInt(m, 10);
y = parseInt(y, 10);
Expand Down
4 changes: 2 additions & 2 deletions dist/creditcard.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "creditcard.js",
"version": "2.0.2",
"version": "2.0.3",
"description": "A simple library for credit-card validation in JavaScript",
"main": "dist/creditcard.min.js",
"repository": "ContaAzul/creditcard.js",
Expand Down

0 comments on commit 888119a

Please sign in to comment.