优化标签校验

This commit is contained in:
zhouhao 2022-11-02 16:28:37 +08:00
parent 1a0d2637e6
commit cc7e40b11d
1 changed files with 2 additions and 2 deletions

View File

@ -45,8 +45,8 @@ public class DeviceTagEntity extends GenericEntity<String> {
private String name;
@Column(length = 256, nullable = false)
@NotBlank(message = "[value]不能为空", groups = CreateGroup.class)
@Length(max = 256, min = 1, message = "[value]长度不能大于256", groups = CreateGroup.class)
@NotNull(message = "[value]不能为空", groups = CreateGroup.class)
@Length(max = 256, message = "[value]长度不能大于256", groups = CreateGroup.class)
@Schema(description = "标签值")
private String value;