From c626173833784c86920b448793ac45005af4c058 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 2 Feb 2023 09:01:34 +0100 Subject: [PATCH] Improved error message for ASCIIUsernameValidator. Follow up to 10bb21e71e3668f770493e2af0d0e0271830f7a3. Co-authored-by: Paolo Melchiorre --- django/contrib/auth/validators.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/auth/validators.py b/django/contrib/auth/validators.py index 82fa7b2d73e..bf3894a4d9c 100644 --- a/django/contrib/auth/validators.py +++ b/django/contrib/auth/validators.py @@ -9,8 +9,8 @@ from django.utils.translation import gettext_lazy as _ class ASCIIUsernameValidator(validators.RegexValidator): regex = r"^[\w.@+-]+\Z" message = _( - "Enter a valid username. This value may contain only ASCII letters, " - "numbers, and @/./+/-/_ characters." + "Enter a valid username. This value may contain only unaccented lowercase a-z " + "and uppercase A-Z letters, numbers, and @/./+/-/_ characters." ) flags = re.ASCII