mirror of
https://github.com/django/django.git
synced 2025-08-31 07:47:37 +00:00
Fixed #22123 -- EmailValidator now also accepts IPv6 literals in addresses
This commit is contained in:
parent
173aa51997
commit
98f13762d7
3 changed files with 31 additions and 7 deletions
|
@ -33,6 +33,9 @@ TEST_DATA = (
|
|||
(validate_email, 'email@here.com', None),
|
||||
(validate_email, 'weirder-email@here.and.there.com', None),
|
||||
(validate_email, 'email@[127.0.0.1]', None),
|
||||
(validate_email, 'email@[2001:dB8::1]', None),
|
||||
(validate_email, 'email@[2001:dB8:0:0:0:0:0:1]', None),
|
||||
(validate_email, 'email@[::fffF:127.0.0.1]', None),
|
||||
(validate_email, 'example@valid-----hyphens.com', None),
|
||||
(validate_email, 'example@valid-with-hyphens.com', None),
|
||||
(validate_email, 'test@domain.with.idn.tld.उदाहरण.परीक्षा', None),
|
||||
|
@ -49,6 +52,10 @@ TEST_DATA = (
|
|||
(validate_email, 'abc@.com', ValidationError),
|
||||
(validate_email, 'something@@somewhere.com', ValidationError),
|
||||
(validate_email, 'email@127.0.0.1', ValidationError),
|
||||
(validate_email, 'email@[127.0.0.256]', ValidationError),
|
||||
(validate_email, 'email@[2001:db8::12345]', ValidationError),
|
||||
(validate_email, 'email@[2001:db8:0:0:0:0:1]', ValidationError),
|
||||
(validate_email, 'email@[::ffff:127.0.0.256]', ValidationError),
|
||||
(validate_email, 'example@invalid-.com', ValidationError),
|
||||
(validate_email, 'example@-invalid.com', ValidationError),
|
||||
(validate_email, 'example@inv-.alid-.com', ValidationError),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue