cjihrig / credit-card

Credit card validation
MIT License
104 stars 22 forks source link

validate question #20

Closed noel35 closed 9 years ago

noel35 commented 9 years ago

Hello :

Sorry first, my engilsh isn't very good.

I need to validate a lot of card types.

var card = { cardType: 'VISA', number: '4111111111111111', expiryMonth: '03', expiryYear: '2100', cvv: '123' }; var validation = CreditCard.validate(card);

When card type is Visa Delta or Visa Electron or Visa Debit, Can I use CreditCard.validate(card) by cardType: 'VISA' to get correct result ? thank you a lot.

cjihrig commented 9 years ago

According to http://support.worldpay.com/support/kb/bg/testandgolive/tgl5103.html, Visa debit and electron numbers start with a 4, so they should be fine.