Skip to content

Commit

Permalink
#2842 consolidate diners club
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Aug 13, 2015
1 parent 2e27d00 commit d3b280b
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions src/definitions/behaviors/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1247,14 +1247,14 @@ $.fn.form.settings = {
creditCard: function(cardNumber, cardTypes) {
var
cards = {
amex: {
pattern : /^3[47]/,
length : [15]
},
visa: {
pattern : /^4/,
length : [16]
},
amex: {
pattern : /^3[47]/,
length : [15]
},
mastercard: {
pattern : /^5[1-5]/,
length : [16]
Expand All @@ -1267,29 +1267,25 @@ $.fn.form.settings = {
pattern : /^(62|88)/,
length : [16, 17, 18, 19]
},
dinersClub: {
pattern : /^30[0-5]/,
length : [14]
},
dinersClubInternational: {
pattern : /^36/,
length : [14]
},
jcb: {
pattern : /^35(2[89]|[3-8][0-9])/,
length : [16]
},
maestro: {
pattern : /^(5018|5020|5038|6304|6759|676[1-3])/,
length : [12, 13, 14, 15, 16, 17, 18, 19]
},
dinersClub: {
pattern : /^(30[0-5]|^36)/,
length : [14]
},
laser: {
pattern : /^(6304|670[69]|6771)/,
length : [16, 17, 18, 19]
},
visaElectron: {
pattern : /^(4026|417500|4508|4844|491(3|7))/,
length : [16]
},
maestro: {
pattern : /^(5018|5020|5038|6304|6759|676[1-3])/,
length : [12, 13, 14, 15, 16, 17, 18, 19]
}
},
valid = {},
Expand Down

0 comments on commit d3b280b

Please sign in to comment.