From 1503a932a80a2ec5fb1c32c9a89fb5a8c214a47d Mon Sep 17 00:00:00 2001 From: Chaitanya Rahalkar Date: Fri, 20 Dec 2024 20:08:07 -0600 Subject: [PATCH] restructured the tld variable in the DomainValidator and modified the regex performance test to match the validation --- django/core/validators.py | 13 +++++-------- tests/forms_tests/field_tests/test_emailfield.py | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/django/core/validators.py b/django/core/validators.py index d0851af545..ff9573b172 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -75,14 +75,14 @@ class DomainNameValidator(RegexValidator): # Max length for domain name labels is 63 characters per RFC 1034 sec. 3.1. domain_re = r"(?:\.(?!-)[a-z" + ul + r"0-9-]{1,63}(?