@TimeType: java.util.Date,java.util.Calendar, java.time.Instant, java.time.LocalDate, java.time.LocalDateTime, java.time.LocalTime, java.time.MonthDay, java.time.OffsetDateTime, java.time.OffsetTime, java.time.Year, java.time.YearMonth, java.time.ZonedDateTime, java.time.chrono.HijrahDate, java.time.chrono.JapaneseDate, java.time.chrono.MinguoDate, java.time.chrono.ThaiBuddhistDate; Additionally supported by HV, if the Joda Time date/time API is on the classpath: any implementations of ReadablePartial and ReadableInstant
@BigDataType: BigDecimal, BigInteger, CharSequence, byte, short, int, long and the respective wrappers of the primitive types; additionally supported by HV: any sub-type of Number and javax.money.MonetaryAmount
校验类型 |
支持数据类型 |
描述 |
@AssertFalse |
Boolean, boolean |
Checks that the annotated element is false |
@AssertTrue |
Boolean, boolean |
Checks that the annotated element is true |
@DecimalMax(value=, inclusive=) |
@BigDataType |
Checks whether the annotated value is less than the specified maximum, when inclusive=false. Otherwise whether the value is less than or equal to the specified maximum. The parameter value is the string representation of the max value according to the BigDecimal string representation. |
@DecimalMin(value=, inclusive=) |
@BigDataType |
Checks whether the annotated value is larger than the specified minimum, when inclusive=false. Otherwise whether the value is larger than or equal to the specified minimum. The parameter value is the string representation of the min value according to the BigDecimal string representation. |
@Digits(integer=, fraction=) |
@BigDataType |
Checks whether the annotated value is a number having up to integer digits and fraction fractional digits |
|
CharSequence |
Checks whether the specified character sequence is a valid email address. The optional parameters regexp and flags allow to specify an additional regular expression (including regular expression flags) which the email must match. |
@Future |
@TimeType |
Checks whether the annotated date is in the future |
@FutureOrPresent |
@TimeType |
Checks whether the annotated date is in the present or in the future |
@Max(value=) |
@BigDataType |
Checks whether the annotated value is less than or equal to the specified maximum |
@Min(value=) |
@BigDataType |
Checks whether the annota |