|
|
|
|
|
by ubernostrum
5942 days ago
|
|
You don't need that for pure number validation, no, but it can be a useful heuristic for short-circuiting your validation -- if someone enters a number which should be Visa but clicks "MasterCard", you know something is wrong and should kick back an immediate error message rather than proceeding. |
|
The requirement to select a card type always seems wrong to me. When you swipe a card at a terminal, you don't have to tell it if you're swiping an AmEx or a Visa. It can tell JUST from the number.