Skip to content

Commit 851d6f9

Browse files
authored
Merge pull request #4 from ericksc/feature/hu02-ipv6-jp
JP fix(email): accept IPv6 prefix in address literals
2 parents 0a4e300 + 523cfed commit 851d6f9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/validators/email.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ def email(
6868
if domain_part.startswith("[") and domain_part.endswith("]"):
6969
# ref: RFC 5321
7070
domain_part = domain_part.lstrip("[").rstrip("]")
71+
if ipv6_address and domain_part.startswith("IPv6:"):
72+
domain_part = domain_part[5:]
7173
else:
7274
return False
7375

0 commit comments

Comments
 (0)