5 ms·
At this point, our email validity criteria: .+@.+\..{2,} That is, at least one character for the inbox, at least one character for the domain, at least two fo
by Xorlev 10y ago
At this point, our email validity criteria:
.+@.+\..{2,}
That is, at least one character for the inbox, at least one character for the domain, at least two for the TLD (we assume that TLD-less domains are undeliverable by us). This ensures we don't allow 'a@a' or 'a@a.a', but do allow 'a@a.io'.
- DHowett 10y agoa@[IPv6:2001::1] is, unfortunately for your validation regex, a valid e-mail address. [EDIT: I see that you consider TLD-free e-mail addresses undeliverable; still!]
- bbcbasic 10y ago.+@.+ FTW?
- mnkypete 10y agoThat's what we do. Everything else is just lying to yourself and hoping for the best..
- regularfry 10y agoOr, more simply, `.@.`.
- Senji 10y agoEnjoy getting a billion e-mails per second written to root@localhost
- bbcbasic 10y agoAs if. There would be a single confirmation email sent which would not be clicked.
- blechschmidt 10y agoThis might already filter out legitimate users. dig MX io. Also, you don't know what new TLDs ICANN might come up with at some point. I am pretty sure there are service providers that do and did limit the TLD length and then TLDs like xn--vermgensberatung-pwb came up.
- zeveb 10y agoThat wouldn't allow ceo@cocacola, which is a valid email address (I don't know if mail will be delivered to it, but cocacola is an actual TLD).
- tobinfricke 10y agoIan Goldberg once maintained the email address <n@ai>, touted as the shortest possible. An edge case, but it would fail your validation.