我有下面的類來驗證: @Document(collection = "settings")
public class Settings {
@NotEmpty
private String[] allowableExtensions;
...
@AssertTrue(message = "Each extension must be alphanumeri
我有以下的模型類 public class ContactDetail {
@NotNull(message="StartNum cannot be null")
private int startNum;
@NotNull(message="EndNum cannot be null")
private int endNum; }
我怎麼會去驗證的範圍
我有以下的模型類 import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
public class Person {
@Max(value = 10, message = "First name should be smaller than 10 characters.")