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

Add maximum length condition for e-mail address #67

Merged
merged 1 commit into from Sep 6, 2017
Merged

Add maximum length condition for e-mail address #67

merged 1 commit into from Sep 6, 2017

Conversation

danielstgt
Copy link
Contributor

@danielstgt danielstgt commented Sep 2, 2017

According to the RFC, an e-mail address can have a maximum of 254 characters.

Since addresses that do not fit in those fields are not normally useful, the upper limit on address lengths should normally be considered to be 254.

Source: RFC Errata Report

Further information:
Stackoverflow: What is the maximum length of a valid email address?

Instead of referring to the max condition manually, the global maximum length makes sure that all e-mail addresses are conform to the RFC specification.

This pull request adds this condition.

Off-topic: Other positive side effects are, that some database fields with a 255 VARCHAR limit, which is quite common for an e-mail address, won't be exceeded.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 88.235% when pulling 4630246 on danielstgt:patch-1 into c26eb70 on yiminghe:master.

@danielstgt danielstgt changed the title Add maximum length condition for e-mail address (RFC standard) Add maximum length condition for e-mail address Sep 2, 2017
@yiminghe yiminghe merged commit b699987 into yiminghe:master Sep 6, 2017
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.

None yet

3 participants