Most websites will probably validate email addresses with regexes that expect a dot in the host part.
Most websites will probably validate email addresses with regexes that expect a dot in the host part.
Validation emails also come with the added benefit of ensuring people enter their correct address (is not just randomly mashing the keyboard). Of course that doesn't stop them from using multiple addresses nor those burner address services, but neither would regex.
The problem is validation emails take more dev time to build so some people get lazy and use form validation such as regex instead.
If for example during a typical registration process the software merely sends an email instead of also trying to validate the address first the user either has to wait until the email has arrived before entering the remaining data or otherwise might end up with invalid registration data that cannot be retrieved anymore. In this case, the user would have to start over again.
This problem could be alleviated by having a two-step process, during which the software merely asks for the email address in the first step and the remaining data can only be filled in after the email address has been verified. However, depending on the requirements of the software it might make sense to not just ask for the email address but additional required information during the first step as well, in which case validating with regular expressions provides a better user experience through feedback.
... only to people who are not listening to the complaints from users whose perfectly valid mailboxes are rejected by such systems. It seems somewhat hypocritical for designers to go on about "good user experience" when the user experience in practice turns out to be that it is impossible to give the system their actual electronic mail addresses at all.
Then you could do the hard-fail checks very conservatively and still catch some mistakes early.
The idea here is to help the user avoid mistakes not to actually verify the email address. That's happening at a later stage, i.e. when the user clicks on a confirmation link.
your regex is too strict and doesn't accept all valid email addresses. my."really uncommon".email@is.valid is a valid email address that you would be rejecting.
the sane regex is /.+@.+/. Anything beyond checking for an @ is getting into very complicated territory (even the domain part allows stuff like round and square brackets)
Anyway, the point is to assist the user, not to verify the email address actually is valid.
My simple gmail address gets added to some new service by someone with a similar name at least once a week. And those services may or may not ask for confirmation, but then proceed to not care either way. It's super annoying. I get that people sometimes can't be bothered to confirm an account, but it still feels somehow very wrong.
If you're unsure whether you've already registered an account, I could understand the frustration of finding your "proper" dot configuration, but as a developer I'd figure that to be your problem.
I'm in progress to migrating to an e-mail in my own domain, and I'm enjoying the extra control it gives me. I now use e-mails in the form of label@username.mydomain, which get internally translated to username+label@mydomain. Beyond solving problems with broken registration forms, it also makes it more difficult for spammers/data brokers to normalize the address - I assume most won't bother.
With Gmail you can move the dot around, it's effectively stripped, to make sorta unique ones. But everyone serious about validating against Gmail knows to strip it out.
They found it unbelievable that my email address could match their domain, and assumed I'd made a mistake.
I honestly cannot register to a good 80% of the sites I want to.