mirror of
https://github.com/django/django.git
synced 2025-07-16 07:39:12 +00:00
Update fields.py
This commit is contained in:
parent
737fbc0dc1
commit
2c8445ae66
@ -617,9 +617,9 @@ class EmailField(CharField):
|
|||||||
default_validators = [validators.validate_email]
|
default_validators = [validators.validate_email]
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
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.
|
# section 3.
|
||||||
kwargs.setdefault("max_length", 320)
|
kwargs.setdefault("max_length", 254)
|
||||||
super().__init__(strip=True, **kwargs)
|
super().__init__(strip=True, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user