3 ms·
Most US sellers use some sort of USPS certified address validation and cleanup software to catch data entry errors and prevent delivery problems. So dumping eve
by nradov 8y ago
Most US sellers use some sort of USPS certified address validation and cleanup software to catch data entry errors and prevent delivery problems. So dumping everything but the country into a single big field isn't necessarily a viable design.
https://www.usps.com/nationalpremieraccounts/manageprocessandaddress.htm https://www.usps.com/nationalpremieraccounts/manageprocessan...
- manigandham 8y agoThat's why I said "use an API to standardize". I don't see why this is incompatible with having a single field. Unless you actually need the component parts, it's much easier to manage than the schema needed for all the variations.
- nradov 8y agoIt's not really practical to call the API every time you need a normalized address. Normalize once and ask for user confirmation, then store the clean address with a separate field per component.
- manigandham 8y agoSure, that's covered by "Unless you actually need the component parts" Either way, yes you should store the clean standardized data and not the input. I didn't think that was confusing. Also you can get the best of both options with a JSON field.
- wstuartcl 8y agoDO NOT DO THIS. Have you ever moved into a new house or apartment on a new street or address? Effectively blocking users because you assume their address is corrupt because your system is out of date. At some point you have to choose what is better, trusting that your users are able to enter their address or that an API (from USPS or one of the dozen or so others out there) is able to understand what is and is not a valid address.
- nradov 8y agoDon't trust your users. Use the address validation software, but if the address doesn't work allow the user to specifically choose to use their original entry. That's how most large ecommerce vendors operate now and it allows a manual override for new addresses. And the address lists are updated very quickly now for any decent software. So it's only a problem for a very limited time.
- flukus 8y agoNot just new users, due to some bitrot Pizza Hut has decided that my house, built in the 60's and probably occupied for 100+ years, no longer exists and they won't let me order. Not a big loss in this case, but imagine if this was someone like amazon deciding my address wasn't valid.
- manigandham 8y agoOk, have 2 fields. Input and Standardized. Confirm with the user if their input is not being standardized to make sure it isn't an error (which is explicitly called out in this article as a problem). No reason to go to one extreme or another and lose sight of the actual problem.