diff --git a/django/core/validators.py b/django/core/validators.py index 01c6dbf82e..b183feb402 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -217,13 +217,14 @@ class EmailValidator: r'*"\Z)', re.IGNORECASE, ) - # Use DomainNameValidator patterns but remove the optional trailing dot domain_regex = _lazy_re_compile( - r"^" + DomainNameValidator.hostname_re + DomainNameValidator.domain_re + r"\." - r"(?!-)" - r"(?:[a-z" + DomainNameValidator.ul + "-]{2,63}|xn--[a-z0-9]{1,59})" - r"(?