1
0
mirror of https://github.com/django/django.git synced 2025-06-08 13:09:13 +00:00

Update fields.py

This commit is contained in:
Kushagra S 2024-01-22 17:34:58 +05:30 committed by GitHub
parent 737fbc0dc1
commit 2c8445ae66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -617,9 +617,9 @@ class EmailField(CharField):
default_validators = [validators.validate_email]
def __init__(self, **kwargs):
# The default maximum length of an email is 320 characters per RFC 3696
# The default maximum length of an email is 254 characters per RFC 5321/5322
# section 3.
kwargs.setdefault("max_length", 320)
kwargs.setdefault("max_length", 254)
super().__init__(strip=True, **kwargs)