Java Reference
In-Depth Information
Constraint
Supported type
Description
This ensures that the value of
the object is null
@Null
Object
This ensures that the value of
the object is not null
@NotNull
Object
@AssertTrue boolean , Boolean
This ensures that the value of
the object is true
@AssertFalse boolean , Boolean
This ensures that the value of
the object is false
BigDecimal , BigInteger
byte , short , int , long , and
the respective wrappers (such as
Byte and Short )
This ensures that the value of
the object is greater than or
equal to the value specified in
the annotation
@Min
BigDecimal , BigInteger
byte , short , int , long , and
the respective wrappers (such as
Byte and Short )
This ensures that the value of
the object is less than or equal
to the value specified in the
annotation
@Max
@DecimalMin BigDecimal , BigInteger ,
CharSequence
This ensures that the value of
the object is greater than or
equal to the value specified in
the annotation
Search WWH ::




Custom Search