Skip to content

Commit

Permalink
fix(installer): add length validation on username (#1640)
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-hnny authored Oct 29, 2021
1 parent fac4877 commit d96db69
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export const validateActions = {
if (!username) {
status = 2;
message = '用户名不能为空';
} else if (username.length < 3 || username.length > 32) {
status = 2;
message = '用户名长度必须在3到32位之间';
} else if (!/^[a-z]*$/.test(username)) {
status = 2;
message = '用户名只支持小写字母';
Expand Down

0 comments on commit d96db69

Please sign in to comment.