refactor: 空值不进行正则校验
This commit is contained in:
@@ -29,7 +29,9 @@ public class UserForm {
|
|||||||
@NotBlank(message = "昵称不能为空")
|
@NotBlank(message = "昵称不能为空")
|
||||||
private String nickname;
|
private String nickname;
|
||||||
|
|
||||||
@Pattern(regexp = "^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$", message = "手机号码格式不正确")
|
|
||||||
|
@Schema(description="手机号码")
|
||||||
|
@Pattern(regexp = "^$|^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$", message = "手机号码格式不正确")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
@Schema(description="性别")
|
@Schema(description="性别")
|
||||||
|
|||||||
Reference in New Issue
Block a user