Hacker News new | ask | show | jobs
by anthonys 4518 days ago
I agree- there's no need to get people to choose the type of card however for 2), that's not always the case.

Pretty much all cards can be validated with the Luhn algorithm in js. See http://stackoverflow.com/questions/20725761/validate-credit-...

2 comments

The card number can be validated, that doesn't make it a valid card. You still have to ask the issuing bank whether the card is an active account, whether it has the funds for the purchase, etc
Yes - things such as two transposed digits can easily and should be trapped on the client side.