Commit 9be08aae63b5a3909656f910977e5f41c6505b06
Committed by
Gitee
!80 bug-fix(用户管理)
Merge pull request !80 from fengdan/fengdan-feature-usermanage:add-fix
Showing
1 changed file
with
2 additions
and
0 deletions
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/vo/user/UserBaseVO.java
| ... | ... | @@ -6,6 +6,7 @@ import org.hibernate.validator.constraints.Length; |
| 6 | 6 | |
| 7 | 7 | import javax.validation.constraints.Email; |
| 8 | 8 | import javax.validation.constraints.NotBlank; |
| 9 | +import javax.validation.constraints.Pattern; | |
| 9 | 10 | import javax.validation.constraints.Size; |
| 10 | 11 | import java.util.Set; |
| 11 | 12 | |
| ... | ... | @@ -18,6 +19,7 @@ public class UserBaseVO { |
| 18 | 19 | |
| 19 | 20 | @ApiModelProperty(value = "用户账号", required = true, example = "yudao") |
| 20 | 21 | @NotBlank(message = "用户账号不能为空") |
| 22 | + @Pattern(regexp = "^[a-zA-Z0-9]{4,30}$", message = "用户账号由 数字、字母 组成") | |
| 21 | 23 | @Size(min = 4, max = 30, message = "用户账号长度为 4-30 个字符") |
| 22 | 24 | private String username; |
| 23 | 25 | ... | ... |