4 ms·
You also don't need to ask for the card type (Visa, MasterCard, etc); it can be automatically determined based on the number.
by pwk 17y ago
You also don't need to ask for the card type (Visa, MasterCard, etc); it can be automatically determined based on the number.
- gommm 17y agoThat's true, but I think that users would probably be confused if they can't chose the card type...
- jamesbritt 17y agoI would want to know that my card type will be accepted before entering the digits. You don't need a drop-down for that, but the list needs to be someplace, and if it's part of the form it can be a sort of a CRC for user intent if the CC number doesn't pan out. Might make it easier to prompt the user to make a correction.
- jrockway 17y agoI have seen some Javascript that adds the logo as soon as you've typed enough digits. I thought it was a nice visual cue that the card type was auto-recognized. I think the logical improvement to this interface would be to put the credit card type after the number, and then have it be auto-selected. That way the user can select if he wants, but it will be correct by the time he goes to select it.
- Manfred 17y agoShowing a logo or a message is really easy, ie. http://github.com/madrobby/creditcard_js http://github.com/madrobby/creditcard_js
- uggedal 17y agoPaypal shows icons of all major credit card companies below the credit card number field. When you start typing the non-matching card types gets grayed out.
- jamesbritt 17y agoThat is really quite clever. It's the sort of idea one wants to generalize and steal for other things on a site. Makes me wonder if there are any sites that showcase or catalog non-trivial/non-obvious UI techniques.
- ubernostrum 17y agoYou 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.
- brk 17y agoIME, all you "know" is that they entered the number and forgot to pick the proper corresponding card type. 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.
- Confusion 17y agoThe 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?
- almost 17y agoIn the US yes, but here in the UK that doesn't work because of Meastro/Switch/Solo cards. It may also be different in other countries. So don't always assume stupidity when you see a drop down box :)
- deleted 17y ago[deleted]