We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 797d9a4 commit 8e20725Copy full SHA for 8e20725
h/models/user.py
@@ -22,6 +22,12 @@
22
23
# nb. This pattern is used in Python code, JSON schemas and HTML forms, so it
24
# needs to use portable syntax.
25
+#
26
+# This pattern was changed in Feb 2025 to restrict the characters that can occur
27
+# at the start and end of usernames. There are a small number of existing user
28
+# accounts which do not conform to the latest pattern. Hence APIs and forms
29
+# which accept existing usernames need to support a more liberal pattern
30
+# (`[A-Za-z0-9._]+`).
31
USERNAME_PATTERN = "^[A-Za-z0-9_][A-Za-z0-9._]+[A-Za-z0-9_]$"
32
33
EMAIL_MAX_LENGTH = 100
0 commit comments