6 ms·
For Canadians... I love this one: ENTER YOUR POSTAL CODE: A1A1A1 <- ERR! A1A 1A1 <- ERR! A1A-1A1 YOU MAY PASS. Lazy %@$# front-end devs
by canada_dry 5y ago
For Canadians... I love this one:
ENTER YOUR POSTAL CODE:
A1A1A1 <- ERR!
A1A 1A1 <- ERR!
A1A-1A1 YOU MAY PASS.
Lazy %@$# front-end devs that can't reformat the input!
- shric 5y agoI'd say it's the backend's job to accept any of those and reformat accordingly. If you rely on the frontend the backend would still have to validate it anyway.
- IggleSniggle 5y agoYup. If you’re going to do validation on the frontend, it should be for the sole purpose of improving user experience, not for making life worse!
- ceejayoz 5y agoMy email address has a dash in the domain and it's remarkable how many sites (and big ones, too!) reject it as an invalid domain. Discover.com, for example, rejected it when I did a card application, but disabling JavaScript let it go through on the server-side validation. Bloody weird.
- sneak 5y agoLots of websites reject email addresses at entirely valid domain names as invalid, too, such as any at some of the new TLDs like .email.
- whatatita 5y agoSo many websites provide some TLD validation but don't keep it up to date. Using .xyz is an exercise in frustration.
- ceejayoz 5y agoI'm a little more inclined to forgive that, but dashes in the domain have been valid for decades.
- Symbiote 5y agoSince the start, even. bell-atl.com is one of the oldest domains still in use, registered in 1986.
- indymike 5y agoYep. One of our salespeople had a fit because a prospect couldn't get emails from him. The return message said "we do not accept email from the .io top level domain".
- xoa 5y agoReally the entire idea of client/server-side email "validation" kind of seems like an ancient, cockroach-like anti-pattern that is impossible to stamp out. Like, what is the problem they're even solving? One validates email addresses by sending an email with a token the user then acts on. There are useful things to do with emails, like checking against already registered ones (including any blacklists), but I can't think of any that would result in any in-page user feedback since that would generally be a dumb information leak. Like if someone tries to register an already registered email, send an email about it don't leak that it's registered. And as well as being useless most such scripts seem to date back a long ways and have very lazy and fixed assumptions about what constitutes a valid address. I mean, I've never been a fan of the explosion of TLDs, but it's also a reality and they're all valid. Even on the left side of the @ a surprising number of scripts seem to fail on things that are perfectly acceptable characters. Strikes me as one of the many little minor GUI traps where new designers get carried away with the power of scripts and do without asking if they should, then further get too clever by half.
- Nadya 5y ago> Even on the left side of the @ a surprising number of scripts seem to fail on things that are perfectly acceptable characters. I've had an input require a minimum of 3 characters on the left side of the @ to register. My email was just "me@example.com" using my own domain name. A perfectly valid email address. I am also unable to sign up for Id.me for the IRS because it rejects both of my personal email addresses. I cannot register to create NPM packages for the same reason. I also cannot sign up for Vercel either. I cannot sign up to Vercel via Github and when I try to sign up by email it says the account already exists. When I attempt to do a password recovery for the email it says "Sorry, we are unable to validate that email." So the original error of "account already exists" is actually wrong - the account doesn't exist and can't exist because they aren't able to validate the email for it. My personal emails aren't even "weird" ones like ones with an emoji or punycode domain or non-Latin character sets. I hate with a fiery, burning passion every site that attempts to do any kind of email validation beyond simply sending me an email and letting me click a link to verify my email exists.
- 5y ago
- mcbishop 5y agoMy email address is "_@" followed by a domain name with a dash followed by the "shop" domain ending. It gets rejected a lot, but I won't give it up. It's a good indicator of whether I should spend more time at the website.
- dan-robertson 5y agoThe U.K. government does this a ton with random reference numbers, even on their new (mostly good) sites and it drives me up the wall. Oftentimes they will give you these numbers with spaces but the form will not let you enter it with spaces (so it will fail if you copy-paste), or even worse the form will have a size limit so if you paste your 10 digit number with two spaces, the last two digits will be chopped off so it will fail again when you remove the spaces. Another problem is phone numbers: if you want to use some autofill functionality, your phone number will often include the country code part but the field won’t allow a + (maybe in this case the autofill feature should drop the country code (and add a 0) or replace the + with 00). I’m not actually sure about the significance of the space in U.K. postcodes. I feel like it shouldn’t be significant as one can imagine a regex for the two parts, /([A-Z]+[0-9]+)\s*([0-9][A-Z]+)/, but I then there are exceptions like EC1R.
- wruza 5y agoMy favorite is a video cutter software that has two four-sectioned inputs for start/end times, like hh:mm:ss.ttt. You enter e.g. 00:17:44.500 into “start”, deleting minutes section with DEL, because it’s full with zeroes. And then you can’t enter 17 into end-minutes field, because video length is 21:30 and 17:30 is less than 17:44.500, which is bad. You have to first del-fix end-seconds and then go back to minutes. But wait, you want to cut to 17:50, but 21:50 is more than the video length (21:30), so as you type 50 it makes it into obvious 05! You have to del-fix minutes to 20, del-fix seconds to 50 (now you’re half-good), go back to minutes and del-fix these to 17. Milliseconds are no-brainer from there, don’t worry (but do not forget to unfocus the input, because otherwise it doesn’t apply). Sadly it still cuts along nearest keyframes only, but hey, at least it works. If you think that I’m just kidding, it’s Gihosoft Video Cutter, one of 10 best video cutters out there.
- Symbiote 5y agoHere is the official UK postcode regex: ^([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9]?[A-Za-z])))) [0-9][A-Za-z]{2})$ The second part is always 3 characters. The first part can be 2, 3 or 4 (B1, B30, SW2, SW11, EC1A).
- 5y ago