|
|
|
|
|
by kazinator
4002 days ago
|
|
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. |
|