'javax.validation.constraints' package provides number of annotations to do validations on data.
Below table summarizes the annotations provided by JSR-380 specification.
Annotation | Description |
AssertFalse | |
AssertFalse.List | Defines several AssertFalse annotations on the same element. |
AssertTrue | The Annotated Element must be true. |
AssertTrue.List | Defines several AssertTrue annotations on the same element. |
DecimalMax | The annotated element must be a number whose value must be lower or equal to the specified maximum. |
DecimalMax.List | Defines several DecimalMax annotations on the same element. |
DecimalMin | The annotated element must be a number whose value must be higher or equal to the specified minimum. |
DecimalMin.List | Defines several DecimalMin annotations on the same element. |
Digits | The annotated element must be a number within accepted range Supported types are: BigDecimal BigInteger CharSequence byte , short , int , long , and their respective wrapper types |
Digits.List | Defines several Digits annotations on the same element. |
Email | The string has to be a well-formed email address. |
This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here