Skip to content

Commit 47c27e5

Browse files
committed
fix: update username regex validation to allow any characters within length constraints
1 parent 609667d commit 47c27e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/users/serializers/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class UserInstance(serializers.Serializer):
143143
min_length=4,
144144
validators=[
145145
validators.RegexValidator(
146-
regex=re.compile("^[^\u4e00-\u9fa5]{4,20}$"),
146+
regex=re.compile("^.{4,20}$"),
147147
message=_('Username must be 4-20 characters long')
148148
)
149149
]

0 commit comments

Comments
 (0)