3 ms·
Perfect is the enemy of good. If it is a string that has an @ sign, a dot and is at least six characters long, it's probably a valid email address. a@b.cc No
by _wldu 5y ago
Perfect is the enemy of good.
If it is a string that has an @ sign, a dot and is at least six characters long, it's probably a valid email address.
a@b.cc
No need to go further than this. It's not worth the time.
- criddell 5y agoYou don't need the dot. Item 12 in the list is "You can have dotless domain names."
- Biganon 5y agoDo you know many people who own a TLD?
- criddell 5y agoLast time I checked, some of the TLDs did have an MX record. Perhaps they use it for support or something? I could imagine emailing info@tld or admin@tld or support@tld.
- harg 5y agoindeed, the point the parent comment was making is that effective email validation need not perfectly implement the RFC. dotless domains are going to be so rare in practice (unless your project has some niche use-case) that you can probably ignore them and call them invalid for the sake of simplicity.
- criddell 5y agoIt's worth alerting the user that they likely made a mistake. However, I think they should be allowed to continue with a dotless address.