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.)
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.
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.
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.