评价等增加长度检验
This commit is contained in:
@ -4,6 +4,7 @@ import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
/**
|
||||
* @ClassName ProductReplyParam
|
||||
@ -14,6 +15,7 @@ import javax.validation.constraints.NotBlank;
|
||||
@Setter
|
||||
public class ProductReplyParam {
|
||||
@NotBlank(message = "评论不能为空")
|
||||
@Size(min = 1, max = 200,message = "长度超过了限制")
|
||||
private String comment;
|
||||
private String pics;
|
||||
@NotBlank(message = "请为商品评分")
|
||||
|
@ -3,6 +3,7 @@ package co.yixiang.modules.user.param;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
@ -14,7 +15,9 @@ import java.io.Serializable;
|
||||
public class UserEditParam implements Serializable {
|
||||
@NotBlank(message = "请上传头像")
|
||||
private String avatar;
|
||||
|
||||
@NotBlank(message = "请填写昵称")
|
||||
@Size(min = 1, max = 60,message = "长度超过了限制")
|
||||
private String nickname;
|
||||
|
||||
|
||||
|
@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
@ -16,11 +17,13 @@ import java.io.Serializable;
|
||||
public class AddressParam implements Serializable {
|
||||
private String id;
|
||||
@NotBlank
|
||||
@Size(min = 1, max = 30,message = "长度超过了限制")
|
||||
private String real_name;
|
||||
private String post_code;
|
||||
private String is_default;
|
||||
private String wx_export;
|
||||
@NotBlank
|
||||
@Size(min = 1, max = 60,message = "长度超过了限制")
|
||||
private String detail;
|
||||
@NotBlank
|
||||
private String phone;
|
||||
|
Reference in New Issue
Block a user