1. You don’t need to ask me for *both* my city/state *and* my ZIP. The latter implies the former. We have the technology.
2. If I enter a ZIP+4, and your system isn’t equipped to handle 10-character ZIP codes, just silently drop the final four digits. Here, I’ll give you the Perl code you need: $zip =~ s#(d{5})-(d{4})#$1#; . You can thank me later. (I gather that it’s similar in PHP.)
3. Don’t tell me to leave spaces out of my credit-card number. Again, we have the technology. ($credit_card =~ s#s+##g;)
4. Just don’t create a retail website. The only company that would be allowed to create a retail website in Stevetopia would be Amazon. Maybe Google.
2 Comments
%d bloggers like this:
Although I had the same thought about zip codes for years. I looked into it earlier this year. It turns out zip codes aren’t tied to one city or in like two cases, even to a single state.
Crazy shit man…
LikeLike
Thank you! The failure to use simple regular expressions to normalize this kind of input is baffling.
LikeLike
0 Pingbacks