Java Reference
In-Depth Information
Constraint
Supported type
Description
byte
,
short
,
int
,
long
, and
the respective wrappers (such as
Byte
and
Short
)
@DecimalMax BigDecimal
,
BigInteger
,
CharSequence
This ensures that the value of
the object is less than or equal
to the value specified in the
annotation
byte
,
short
,
int
,
long
, and
the respective wrappers (such as
Byte
and
Short
)
CharSequence
,
Collection
,
Array
, and
Map
This ensures that the size of
the object is in the defined
range
@Size
BigDecimal
,
BigInteger
,
CharSequence
This ensures that the value of
the object is in the defined
range
@Digits
byte
,
short
,
int
,
long
, and
the respective wrappers (such
asByte
and
Short
)
java.util.Date
and
java.util.Calendar
This ensures that the date
contained in the object is prior
to the date of treatment
@Past