Commit fa1e527db3984871ad6f3a42cfb5c91ed1c850b9
1 parent
1233921b
239 AuthLoginReqVO同步AuthRegisterReqVO、TenantSaveReqVO、UserSaveReqVO的username验证
Showing
2 changed files
with
3 additions
and
3 deletions
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/vo/AuthLoginReqVO.java
| @@ -23,8 +23,8 @@ public class AuthLoginReqVO extends CaptchaVerificationReqVO { | @@ -23,8 +23,8 @@ public class AuthLoginReqVO extends CaptchaVerificationReqVO { | ||
| 23 | 23 | ||
| 24 | @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudaoyuanma") | 24 | @Schema(description = "账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudaoyuanma") |
| 25 | @NotEmpty(message = "登录账号不能为空") | 25 | @NotEmpty(message = "登录账号不能为空") |
| 26 | - @Length(min = 4, max = 16, message = "账号长度为 4-16 位") | ||
| 27 | - @Pattern(regexp = "^[A-Za-z0-9]+$", message = "账号格式为数字以及字母") | 26 | + @Length(min = 4, max = 30, message = "账号长度为 4-30 位") |
| 27 | + @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "账号格式为数字以及字母") | ||
| 28 | private String username; | 28 | private String username; |
| 29 | 29 | ||
| 30 | @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "buzhidao") | 30 | @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "buzhidao") |
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserSaveReqVO.java
| @@ -23,7 +23,7 @@ public class UserSaveReqVO { | @@ -23,7 +23,7 @@ public class UserSaveReqVO { | ||
| 23 | 23 | ||
| 24 | @Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao") | 24 | @Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yudao") |
| 25 | @NotBlank(message = "用户账号不能为空") | 25 | @NotBlank(message = "用户账号不能为空") |
| 26 | - @Pattern(regexp = "^[a-zA-Z0-9]+$", message = "用户账号由 数字、字母 组成") | 26 | + @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成") |
| 27 | @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符") | 27 | @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符") |
| 28 | @DiffLogField(name = "用户账号") | 28 | @DiffLogField(name = "用户账号") |
| 29 | private String username; | 29 | private String username; |