mirror of
https://github.com/201206030/novel.git
synced 2025-07-17 09:36:38 +00:00
build: 集成参数校验支持
This commit is contained in:
@ -0,0 +1,29 @@
|
||||
package io.github.xxyopen.novel.dto.req;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户注册 请求DTO
|
||||
*
|
||||
* @author xiongxiaoyang
|
||||
* @date 2022/5/16
|
||||
*/
|
||||
@Data
|
||||
public class UserRegisterReqDto {
|
||||
|
||||
@NotBlank(message="手机号不能为空!")
|
||||
@Pattern(regexp="^1[3|4|5|6|7|8|9][0-9]{9}$",message="手机号格式不正确!")
|
||||
private String username;
|
||||
|
||||
@NotBlank(message="密码不能为空!")
|
||||
private String password;
|
||||
|
||||
@NotBlank(message="验证码不能为空!")
|
||||
@Pattern(regexp="^\\d{4}$",message="验证码格式不正确!")
|
||||
private String velCode;
|
||||
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user