3 ms·
The chance of someone making a typo and still having entered a valid cc number is quite small.
by Confusion 17y ago
The chance of someone making a typo and still having entered a valid cc number is quite small.
- ubernostrum 17y agoIt's more a question of whether you even continue to validate the number at that point; personally I'd choose not to since you already know something's wrong. Hence I treat it as a short-circuit validation trick.
- Confusion 17y agoBut that already assumes that you ask the card type in the first place. There's no need for that and hence no possibility to choose to stop validation. It smells like premature optimization to ask the cc type for this reason?