-
Notifications
You must be signed in to change notification settings - Fork 321
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
Incorrect default email length 255. #658
Comments
Because the default is close to but not less than the maximum; and because this is a default that can be changed as needed; and because this default has been deployed for several years; I don't currently see a reason to decrease the default to 254. |
Hmm… ok. Keeping in mind, though, that the current default enables people to store invalid email addresses, i.e. one character too long. |
It's also possible that people might store things that are convenient to store as email addresses but aren't guaranteed to be. For example, a service may want to store author email addresses listed in git commits, which may not be valid email addresses. Developers will simply need to control their inputs and requirements. Enforcement shouldn't happen from the database layer. |
Yeah the problem of “syntactically correct” email address vs. “valid” actual email address.
I kind-of agree, though my OCD-driven nit-picking engineering attitude squirms a bit 😉 I’m using |
The default length of a string to store an email is currently 255:
sqlalchemy-utils/sqlalchemy_utils/types/email.py
Line 38 in 5c4ca8c
However, according to the RFC and also this discussion the maximum length of an email address is 254:
This is probably not a big issue but should be considered for accuracy’s sake.
(See also related old PR #230.)
The text was updated successfully, but these errors were encountered: