mirror of
https://github.com/django/django.git
synced 2025-06-08 21:19:13 +00:00
Added tests for validataing email length of 254 characters
This commit is contained in:
parent
3d4e918620
commit
b79b55395e
@ -323,6 +323,9 @@ TEST_DATA = [
|
||||
# Max length of domain name labels is 63 characters per RFC 1034.
|
||||
(validate_email, "a@%s.us" % ("a" * 63), None),
|
||||
(validate_email, "a@%s.us" % ("a" * 64), ValidationError),
|
||||
# validation error if max length of email exceeds 254 chracters.
|
||||
(validate_email, "%s@example.com" % ("a" * 50), None),
|
||||
(validate_email, "%s@example.com" % ("a" * 250), ValidationError),
|
||||
# Trailing newlines in username or domain not allowed
|
||||
(validate_email, "a@b.com\n", ValidationError),
|
||||
(validate_email, "a\n@b.com", ValidationError),
|
||||
|
Loading…
x
Reference in New Issue
Block a user