fix: extend username regex to allow hyphens, plus signs, and forward slashes

The regex pattern for the username field in UserModel was updated from
`^[a-zA-Z0-9_]+$` to `^[a-zA-Z0-9_-+/]+$`, adding support for hyphens,
plus signs, and forward slashes in usernames.
This commit is contained in:
2025-01-31 23:01:23 +00:00
parent ae7f9716a5
commit 1c972649ed
+1 -1
View File
@@ -8,7 +8,7 @@ class UserModel(BaseModel):
required=True,
min_length=2,
max_length=20,
regex=r"^[a-zA-Z0-9_]+$",
regex=r"^[a-zA-Z0-9_-+/]+$",
)
nick = ModelField(
name="nick",