2.1.13 List of supported Bean Validation annotations

The following table lists and describes the supported Bean Validation annotations. Note that with Application Server, you can use Bean Validation from JSF and CDI.

PackageAnnotation
javax.validation@Constraint
@GroupSequence
@OverridesAttribute
@OverridesAttribute.List
@ReportAsSingleViolation
@Valid
javax.validation.constraints@AssertFalse
@AssertFalse.List
@AssertTrue
@AssertTrue.List
@DecimalMax
@DecimalMax.List
@DecimalMin
@DecimalMin.List
@Digits
@Digits.List
@Past
@Pattern.List
@Future
@Future.List
@Max
@Max.List
@Min
@Min.List
@Size
@Size.List
@NotNull
@NotNull.List
@Null
@Null.List
@Pattern
@Pattern.List

For Bean Validation annotations, see the Bean Validation specification documents.

The following table describes the definable range for the annotations of Bean Validation.

Item No.Linkage targetjavax.validation packagejavax.validation.constraintspackageSupported version
1JSF linkageClass on the class pathClass that specifies @ManagedBean09-00
2CDI linkage
user application
Class on the class pathJavaBeans class#09-50
#
When a user program manages the instances of the JavaBeans class, you can use annotations of Bean Validation with that class.
When a container (such as Servlet/EJB) manages the instances of the JavaBeans class, you cannot use annotations of Bean Validation with that class.