These constraints do not cover all functional use cases but do represent all the fundamental blocks to express low level constraints on basic JDK types.
| Modifier and Type | Annotation and Description |
|---|---|
| public @interface | AssertFalse
The annotated element must be false. |
| public @interface | AssertTrue
The annotated element must be true. |
| public @interface | DecimalMax
The annotated element must be a number whose value must be lower or equal to the specified maximum. |
| public @interface | DecimalMin
The annotated element must be a number whose value must be higher or equal to the specified minimum. |
| public @interface | Digits
The annotated element must be a number within accepted range Supported types are:
|
| public @interface | Email
The string has to be a well-formed email address. |
| public @interface | Future
The annotated element must be an instant, date or time in the future. |
| public @interface | FutureOrPresent
The annotated element must be an instant, date or time in the present or in the future. |
| public @interface | Max
The annotated element must be a number whose value must be lower or equal to the specified maximum. |
| public @interface | Min
The annotated element must be a number whose value must be higher or equal to the specified minimum. |
| public @interface | Negative
The annotated element must be a strictly negative number (i.e. 0 is considered as an invalid value). |
| public @interface | NegativeOrZero
The annotated element must be a negative number or 0. |
| public @interface | NotBlank
The annotated element must not be |
| public @interface | NotEmpty
The annotated element must not be |
| public @interface | NotNull
The annotated element must not be |
| public @interface | Null
The annotated element must be |
| public @interface | Past
The annotated element must be an instant, date or time in the past. |
| public @interface | PastOrPresent
The annotated element must be an instant, date or time in the past or in the present. |
| public @interface | Pattern
The annotated |
| public @interface | Positive
The annotated element must be a strictly positive number (i.e. 0 is considered as an invalid value). |
| public @interface | PositiveOrZero
The annotated element must be a positive number or 0. |
| public @interface | Size
The annotated element size must be between the specified boundaries (included). |