News for hackers. Stuff that matters.
Re:"No Dashes Or Spaces" Hall of Shame by pwk on Friday March 19, 2010 @02:33AM (#1203535)
You also don't need to ask for the card type (Visa, MasterCard, etc); it can be automatically determined based on the number.
Re:"No Dashes Or Spaces" Hall of Shame by ubernostrum on Friday March 19, 2010 @06:27AM (#1203821)
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.
Re:"No Dashes Or Spaces" Hall of Shame by brk on Friday March 19, 2010 @07:04AM (#1203855)
IME, 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.

Re:"No Dashes Or Spaces" Hall of Shame by Confusion on Friday March 19, 2010 @08:36AM (#1203975)
The chance of someone making a typo and still having entered a valid cc number is quite small.
Re:"No Dashes Or Spaces" Hall of Shame by ubernostrum on Friday March 19, 2010 @04:33PM (#1205193)
It'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.
Re:"No Dashes Or Spaces" Hall of Shame by Confusion on Friday March 19, 2010 @06:45PM (#1205486)
But 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?
Re:"No Dashes Or Spaces" Hall of Shame by almost on Friday March 19, 2010 @10:15AM (#1204162)
In 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 :)
Re:"No Dashes Or Spaces" Hall of Shame by gommm on Friday March 19, 2010 @02:51AM (#1203559)
That's true, but I think that users would probably be confused if they can't chose the card type...
Re:"No Dashes Or Spaces" Hall of Shame by jamesbritt on Friday March 19, 2010 @03:03AM (#1203572)
I 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.

Re:"No Dashes Or Spaces" Hall of Shame by uggedal on Friday March 19, 2010 @04:34AM (#1203676)
Paypal 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.
Re:"No Dashes Or Spaces" Hall of Shame by jamesbritt on Friday March 19, 2010 @01:23PM (#1204620)
That 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.

Re:"No Dashes Or Spaces" Hall of Shame by jrockway on Friday March 19, 2010 @04:15AM (#1203658)
I 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.

Re:"No Dashes Or Spaces" Hall of Shame by Manfred on Friday March 19, 2010 @04:19AM (#1203661)
Showing a logo or a message is really easy, ie. http://github.com/madrobby/creditcard_js