Module jakarta.validation
Package jakarta.validation.constraints
package jakarta.validation.constraints
Contains all the Jakarta 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.
-
ClassDescriptionThe annotated element must be false.Defines several
AssertFalse
annotations on the same element.The annotated element must be true.Defines severalAssertTrue
annotations on the same element.The annotated element must be a number whose value must be lower or equal to the specified maximum.Defines severalDecimalMax
annotations on the same element.The annotated element must be a number whose value must be higher or equal to the specified minimum.Defines severalDecimalMin
annotations on the same element.The annotated element must be a number within accepted range.Defines severalDigits
annotations on the same element.The string has to be a well-formed email address.Defines several@Email
constraints on the same element.The annotated element must be an instant, date or time in the future.Defines severalFuture
annotations on the same element.The annotated element must be an instant, date or time in the present or in the future.Defines severalFutureOrPresent
annotations on the same element.The annotated element must be a number whose value must be lower or equal to the specified maximum.Defines severalMax
annotations on the same element.The annotated element must be a number whose value must be higher or equal to the specified minimum.Defines severalMin
annotations on the same element.The annotated element must be a strictly negative number (i.e.Defines severalNegative
constraints on the same element.The annotated element must be a negative number or 0.Defines severalNegativeOrZero
constraints on the same element.The annotated element must not benull
and must contain at least one non-whitespace character.Defines several@NotBlank
constraints on the same element.The annotated element must not benull
nor empty.Defines several@NotEmpty
constraints on the same element.The annotated element must not benull
.Defines severalNotNull
annotations on the same element.The annotated element must benull
.Defines severalNull
annotations on the same element.The annotated element must be an instant, date or time in the past.Defines severalPast
annotations on the same element.The annotated element must be an instant, date or time in the past or in the present.Defines severalPastOrPresent
annotations on the same element.The annotatedCharSequence
must match the specified regular expression.Possible Regexp flags.Defines severalPattern
annotations on the same element.The annotated element must be a strictly positive number (i.e.Defines severalPositive
constraints on the same element.The annotated element must be a positive number or 0.Defines severalPositiveOrZero
constraints on the same element.The annotated element size must be between the specified boundaries (included).Defines severalSize
annotations on the same element.