Package javax.validation.constraints


package javax.validation.constraints
Contains all the Bean Validation provided constraints also called built-in constraints.

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.

  • Class
    Description
    The annotated element must be false.
    Defines several AssertFalse annotations on the same element.
    The annotated element must be true.
    Defines several AssertTrue annotations on the same element.
    The annotated element must be a number whose value must be lower or equal to the specified maximum.
    Defines several DecimalMax annotations on the same element.
    The annotated element must be a number whose value must be higher or equal to the specified minimum.
    Defines several DecimalMin annotations on the same element.
    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
    Defines several Digits annotations on the same element.
    The annotated element must be a date in the future.
    Defines several Future annotations on the same element.
    The annotated element must be a number whose value must be lower or equal to the specified maximum.
    Defines several Max annotations on the same element.
    The annotated element must be a number whose value must be higher or equal to the specified minimum.
    Defines several Min annotations on the same element.
    The annotated element must not be null.
    Defines several NotNull annotations on the same element.
    The annotated element must be null.
    Defines several Null annotations on the same element.
    The annotated element must be a date in the past.
    Defines several Past annotations on the same element.
    The annotated CharSequence must match the specified regular expression.
    Possible Regexp flags.
    Defines several Pattern annotations on the same element.
    The annotated element size must be between the specified boundaries (included).
    Defines several Size annotations on the same element.