Improved error message for ASCIIUsernameValidator.

This commit is contained in:
Paolo Melchiorre 2022-09-28 13:07:03 +02:00 committed by GitHub
parent 9976f3d4b8
commit 10bb21e71e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ from django.utils.translation import gettext_lazy as _
class ASCIIUsernameValidator(validators.RegexValidator): class ASCIIUsernameValidator(validators.RegexValidator):
regex = r"^[\w.@+-]+\Z" regex = r"^[\w.@+-]+\Z"
message = _( message = _(
"Enter a valid username. This value may contain only English letters, " "Enter a valid username. This value may contain only ASCII letters, "
"numbers, and @/./+/-/_ characters." "numbers, and @/./+/-/_ characters."
) )
flags = re.ASCII flags = re.ASCII