Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Recent stupidity: UI asked for postal code (knowing the address being entered was Canadian.) Without thinking, the user (not me) put it in as L6A 3Z3. When the form was submitted, it was rejected with the field flagged in Red. the error message said like "please enter the Canadian postal code in the correct format, AnAnAn with no spaces." (AnAnAn? Cryptic to non-coders; the user was baffled.)

Postal codes are written with the space:

https://en.wikipedia.org/wiki/Postal_codes_in_Canada

If you're already validating the format, how much effort would it take to recognize and accept the common variant which has the space in it? A [ ]? in the regex, and a strip spaces function call.



This causes me no end of grief. Credit card fields where you can't enter spaces, phone number fields where you can't format the numbers like a phone number. It's literally a few lines of code to pull out just the numbers! So infuriating.


we get store survey codes on receipts from a local store. "please go fill this out online". OK.

On the receipt: 9873-435-289-6372-9983

Go to their survey page

"Please enter the survey code without the dashes".

WTF? Left hand, please meet the right hand.


Or when putting serial numbers: some show the input box separated by dashes(maybe so that we put it correctly while typing.) But, when I try to paste it in, either it just rejects or simply fills the first block making me copy the sn block by block. If I could, I would have beaten those dialogue boxes with a baseball bat.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: