3 ms·
Ask rather than trying to be 'smart' and out-think the end user. Most of the other replys talk about 'Legal' names vs various levels of friendly name. How abo
by mjevans 5y ago
Ask rather than trying to be 'smart' and out-think the end user.
Most of the other replys talk about 'Legal' names vs various levels of friendly name.
How about Mailing Address fields for snail mail? Don't decompose it, just have a full text area and store EXACTLY what the user provides. POSSIBLY toss it at a an address validation routine your postal services. Be prepared to handle an 'International' printed label where you might print a blob of text you don't understand, targeted to a country you do, and require manual processing for country, payment, and customs forms validations outside of the typical flow.
Try to show the end user examples of where and how the information will be typically used.
Never, ever, break down components of user provided input; at least not without letting them confirm if they're correct and allowing them to skip it if it isn't.
- Orou 5y agoAnyone who's had to parse free-text international addresses can tell you that this is terrible advice. People type things into computers incorrectly all day long. We prompt users to select things like country from dropdowns with good reason. Imagine having to delete user data for GDPR compliance and needing to determine which of your 1,000,000 users are in the EU from a free-text field. Oh, this user wrote "Czechia" instead of "Czech Republic"? What do you mean they wrote the name with accents? Oh they wrote the name in their native language and not English? Have fun parsing all this: https://en.wikipedia.org/wiki/List_of_country_names_in_various_languages_(A%E2%80%93C) https://en.wikipedia.org/wiki/List_of_country_names_in_vario...
- wolfgang42 5y agoThe parent did say “targeted to a country you do [understand]”. The impression I get is that for most address handling the only thing that’s critical to have structured is the country; probably everything else should be free-text until you have a reason not to[1], at which point you should find someone who deals with them for a living (probably a third-party provider), and even then it's probably best to provide a fallback for the weird edge cases. [1]: One good reason is that, as you say, people get things wrong—even their own address—on a regular basis, and you may be charged more money if you’re e.g. shipping things with the wrong postal code for the rest of the address. But even then it’s good to provide a workaround if necessary; post office databases can be wrong too!