Live data from Hacker News

Dear American Website Owner

jan.rychter.com

41–50 of 149 posts

Re: Dear American Website Owner

#41
Once you start to look at the problem, it becomes really hard. It is not only address and phone number formats. The name alone a very hard. American style is given name and family name I guess, and as a German that sounds very convincing. But then you suddenly stumble across a middle initial, whereas in Germany parents give their kids any number of additional forenames, from zero to five or so, not just one for the middle. Then countries like Spain and Iceland traditionally don't have a family name, but surnames derived from the father or the mother, or just the surname from both in a certain order. You have potentially two family-level names then (and potentially the same name twice!). So the person complaining in the blog post probably doesn't know what it means to get these things right, even if you only consider highly developed countries. Even if you only want the name.

Maybe someone should start a library for this problem, and then we all lay back and watch it grow to 50,000 LOC.

Re: Dear American Website Owner

#42
post #40

And fix those drop-down menus for country where I have to scroll allllll....the.....waaaaay....dowwwwwwn to reach United Kingdom!

If it's an HTML element then you can click it to give it focus then start typing the name of option you wish to select.

Re: Dear American Website Owner

#43
post #29

Earlier quoted context omitted.

I'm not snitko, but I don't see the problem. Could you please explain your reasoning?

To be blunt, inputs you don't validate are inputs that will be entered wrong a significant portion of the time. Other concerns may override this for many fields, but unusable phone numbers are generally considered a problem.

Yes, but if you over-validate you also risk losing sales. What to do doesn't seem obvious at all, at least to me. You'd want to do some kind of cost-benefit analysis

Also, wouldn't a phone number in effect be validated for most online credit card purchases? I thought credit card processor often match the phone number you provide to the phone number on record for your account to prevent fraud. Skip the javascript validation, and let the cc processor validate the phone number.

...but I have no idea what I'm talking about, please correct me if I'm wrong.

Re: Dear American Website Owner

#44
post #3

I wish author was a little more constructive here. What phone number pattern would he recommend we use?

Probably the best approach is not using any pattern at all. The less you force your users into something that will not work most of the times, the best. I always struggle to input information even in forms designed specifically for my country. Just let people enter numbers with all the spaces and the dashes the wish. After all, if a human will ever need a phone number, he will be able to read it in any form. If these…

It's curious how many forms do not allow spaces and dashes in numerical data like phone numbers and credit card numbers. Given how easy it is to strip characters out of a string, one wonders why people bother mandating a particular pattern.

Re: Dear American Website Owner

#46
post #32

What's the point of having a state field at all? Isn't there a unique mapping between zip code and state? About the phone numbers, my favorite annoyance is when companies, who always are fond of making stupid mnemonics out of the letters corresponding to their phone number, don't let me enter my mnemonic for my phone number, which I picked from Google Voice specifically because it makes my name, but insists on number…

What's the point of having a state field at all? Isn't there a unique mapping between zip code and state? No. Zip codes may cross state lines.

I am not sure that is completely true. I thought ZIP codes could not cross state lines (at least in the US). And after looking at them, I couldn't find any that were not unique.[http://www.aggdata.com/free/zip-code]

Edit: Sorry, There are a few that cross state lines, when using the first two digits as the state code. However, each ZIP code is unique to a town; therefore, one could use it in the above scenario.

Re: Dear American Website Owner

#47
post #6

Earlier quoted context omitted.

Why use any pattern? Let me enter the phone number in a way I got used to it and deal with it.

There's a cost/benefit analysis to be done. People do make mistakes, and checking their submission against common patterns will save you lost sales. As suggested in a comment on a rant I wrote a few years ago, one strategy is to 'validate' against something reasonable, but instead of rejecting anything that fails, ask the user to confirm that they really do want something unexpected. I'm not sure that 'reasonable' wo…

Well, I suppose you could just validate numbers from the most common countries you see and hope the rest don't make mistakes. Call it the Amdahl's law of internationalization.

Re: Dear American Website Owner

#48
post #38
post #27

I think this blog post REALLY overlooks the fact that interface localization isn't easy; even with a simple web forms. The interface for a search engine is a single input field with dynamic suggestions and people were in an uproar when Bing didn't give suggestions that were localized to the user's country or language. That's to say, if one of the biggest software companies in the world can't get it right, then what h…

Not every aspect of this is easy, true, but that's no reason not to tackle the ones that are. It's trivial to simply not require a state or a postcode or try to verify a phone no if the user selects a country other than the US. There should be a library for this. We have libraries that can handle the insanely capricious details of DST for all countries and subnational entities on the planet; we should have no problem…

Wufoo is pretty good for pre-made forms. And they advertise that they can do US and International phone, mail and currency fields.

Re: Dear American Website Owner

#49
post #32

What's the point of having a state field at all? Isn't there a unique mapping between zip code and state? About the phone numbers, my favorite annoyance is when companies, who always are fond of making stupid mnemonics out of the letters corresponding to their phone number, don't let me enter my mnemonic for my phone number, which I picked from Google Voice specifically because it makes my name, but insists on number…

What's the point of having a state field at all? Isn't there a unique mapping between zip code and state? No. Zip codes may cross state lines.

They certainly can include multiple municipalities.

Re: Dear American Website Owner

#50

I've argued many times for making address one big text field. Let people who live in the country, who own the address, format it how they know it should be formatted.

Me too! I've been arguing this for years, and I have yet for someone to reply with a good reason why it shouldn't be handled this way.

Bad reasons given:

- Safeguard against users who can't be relied on to format their own address properly. Fix 1: Don't worry about that. Fix 2: If you really want this, leave the rest of us an option to use a freeform address instead.

- "Out webshop database has these fields." Fix: Change the database, then.

Post reply on HN