question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Domain name validation in Email validator

See original GitHub issue

Hello developers,

This is more of a question (possibly an issue). I was trying to validate some email addresses using the Email validator class, when I stumbled on it not validating this particular email address: test@domain.c

I then looked into the code and found that the part after the . in the domain name must be at least 2 characters.

May I ask what the reasoning behind this is?

I know email validation (and by extension domain name validation) can be a complicated issue, so I tried looking up if there are formal specifications that can be relied upon. I found that the format of the domain name is specified in this RFC, section 2.1 and by extension this RFC, section B. There seems to be no restrictions there on limiting the part after the . to 2 characters.

I am on Python 3.5.2, running marshmallow version 2.10.3. Thanks in advance!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
maximkulkincommented, Jan 30, 2017

RFC states that top-level domain validation should check for all existing TLDs at the moment and be updated whenever TLD list changes. The validation regexp in Marshmallow is a simplified version that is commonly used. So, as of now it pretty consistent with RFCs. When 1 letter domain will be introduced, then it can be updated. As of now test@domain.c is incorrect email address.

0reactions
bowcommented, Jan 31, 2017

@maximkulkin I’m not in a position to decide any one change, though I tend to agree with @justanr. The RFC itself mentions validating using a DNS service, which may be local to specific users.

But anyway, I think this answers my initial question already. I’ll close this issue for now and leave it for reopening in a possible future where we have ICANN-approved single-letter TLDs 😃.

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Free Email Domain Validation - MailboxValidator
Free email domain validation to check mail server and email policy. Sign up free trial license for 100 queries.
Read more >
Domain Name email Validation - Stack Overflow
Another, the most reliable option to check whether user provided valid e-mail address or not would be sending e-mail with confirmation code to ......
Read more >
Verify Email Address Without Sending an Email | Mailtrap Blog
Email verification lets you get rid of fake or invalid recipients from your mail list, and improve the performance of your email campaign....
Read more >
SSL Certificate email-based Domain Validation
The goal of the validation process is to ensure that the certificate is requested by someone with admin rights on the domain. Therefore,...
Read more >
Validate Email Addresses in Python with email-validator
Deliverability validation ensures that the syntactically correct email address has the domain name (the string after the @ sign - stackabuse. ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found