5 ms·
I thought new TLD being worked on didn't need to have dots in them. Why not just check for x@x?
by MichaelApproved 13y ago
I thought new TLD being worked on didn't need to have dots in them.
Why not just check for x@x?
- fein 13y agoThat's exactly what you should do. ^(.+)@(.+)$ max length is 254 according to the RFC I believe, so you can check for that too.
- carbocation 13y agoBingo. I'm sure there are some HNers with arpanet emails who would appreciate this; it's not just about ipv6!
- therealunreal 13y agoIIRC, last I checked max length was 320.
- fein 13y agoI thought this as well, until looking for info one day and stumbling onto this: http://stackoverflow.com/questions/386294/what-is-the-maximum-length-of-a-valid-email-address http://stackoverflow.com/questions/386294/what-is-the-maximu... Turns out the 320 value was actually incorrect, its 256 but the mailbox is wrapped in square brackets, so 256 - 2 = 254.
- jnelso99 13y agoThe bonus with that regex is that it kind of looks like a dead clown.
- MattBearman 13y agoAs far as I know the new tlds will still have a dot between tld and actual domain (I could be wrong though) but it's just been pointed out that IPv6 emails addresses could fail on my regex. The reason I don't currently use x@y is just to have a better shot at catching typos without being too restrictive.
- marcosdumay 13y agoThere is no requirement for any other level in a domain, except for the TLD.
- ianburrell 13y agoTo use just the TLD, the domain will need to be fully qualified with a trailing dot, "x@tld.". Otherwise, the domain can get confused with just the hostname in the local domain (tld.example.com). Just the hostname is a valid email address but wouldn't need to be accepted by most signup forms. My guess is that nobody will use just the TLD because of the confusion. And because a lot of software does not support fully qualified names.