Skip to content

Commit

Permalink
Update validators.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nannan00 authored Aug 25, 2023
1 parent 7a68605 commit 99e88c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bk-user/bkuser/biz/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ def validate_tenant_id(value):

def validate_data_source_user_username(value):
if not re.fullmatch(re.compile(DATA_SOURCE_USERNAME_REGEX), value):
raise ValidationError(_("{} 不符合 用户名 的命名规范: 由3-32位字母、数字、下划线(_)、点(.)、连接符(-)字符组成,以字母开头").format(value)) # noqa: E501
raise ValidationError(
_("{} 不符合 用户名 的命名规范: 由3-32位字母、数字、下划线(_)、点(.)、连接符(-)字符组成,以字母开头").format(value), # noqa: E501
)

0 comments on commit 99e88c0

Please sign in to comment.