1
0
mirror of https://github.com/django/django.git synced 2025-04-09 07:56:43 +00:00

Update validators.py

Updated source policies
This commit is contained in:
Kushagra S 2024-01-20 22:30:23 +05:30 committed by GitHub
parent e9bc91d907
commit 737fbc0dc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -204,7 +204,7 @@ class EmailValidator:
self.domain_allowlist = allowlist
def __call__(self, value):
# The maximum length of an email is 254 characters per RFC 5321
# The maximum length of an email is 254 characters per RFC 5321/5322
# section 3.
if not value or "@" not in value or len(value) > 254:
raise ValidationError(self.message, code=self.code, params={"value": value})