Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email regex] require a TLD with a minimum length of 2 #15

Closed

Conversation

aaronlelevier
Copy link

I'd like to make a pull request for email validation for a minimum TLD length of 2.

We have some backend validation that says the TLD length should be between 2 and 63. I did some research, and there aren't any registered length of 1 TLD's. An RFC says the max length should be 63. Not sure if the max length validation is excessive though, so didn't add it in this pull request.

@snewcomer
Copy link
Collaborator

There are some Rails gems that enforce min 2 as well.

@offirgolan
Copy link
Collaborator

offirgolan commented Oct 21, 2016

I think this is a breaking change that would require a new major version release. Maybe we can have an option such as minTldLength that is defaulted to 1?

Edit:

I did some research, and there aren't any registered length of 1 TLD's

This could be in case of public TLD's but there could exist private / corporate TLD of 1 char.

@snewcomer
Copy link
Collaborator

@aronysidoro can you close this pull request?

@offirgolan
Copy link
Collaborator

Closing in favor of #39

@offirgolan offirgolan closed this Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants