Java Reference
In-Depth Information
Table 6-1. Built-in Bean Validation Constraints
Annotation Type
Description
@AssertFalse
The annotated element must be false .
@AssertTrue
The annotated element must be true .
@DecimalMax
The annotated element must be a number that cannot have a value that is greater than the
specified maximum value.
Supported types:
BigDecimal
BigInteger
CharSequence
byte , short , int , long , and their wrappers
@DecimalMin
The annotated element must be a number that cannot have a value that is less than the
specified minimum value.
Supported types:
Same as @DecimalMax
@Digits
The annotated element must be a number within the accepted range.
Supported types:
Same as @DecimalMax
@Future
The annotated element must be a date that will occur at some point in the future.
Supported types:
java.util.Date
java.util.Calendar
@Max
The annotated element must be a number that contains a value that is lower than or equal to
the specified maximum value.
Supported types:
Same as @DecimalMax
@Min
The annotated element must be a number that contains a value that is greater than or equal to
the specified minimum value.
Supported types:
Same as @DecimalMax
@NotNull
The annotated element must not be NULL .
@Null
The annotated element must be NULL .
@Past
The annotated element must be a data that occurred at some point in the past.
Supported types:
Same as @Future
( continued )
 
Search WWH ::




Custom Search