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
AssertFalseannotations on the same element.The annotated element must be true.Defines severalAssertTrueannotations on the same element.The annotated element must be a number whose value must be lower or equal to the specified maximum.Defines severalDecimalMaxannotations on the same element.The annotated element must be a number whose value must be higher or equal to the specified minimum.Defines severalDecimalMinannotations on the same element.The annotated element must be a number within accepted range.Defines severalDigitsannotations on the same element.The string has to be a well-formed email address.Defines several@Emailconstraints on the same element.The annotated element must be an instant, date or time in the future.Defines severalFutureannotations on the same element.The annotated element must be an instant, date or time in the present or in the future.Defines severalFutureOrPresentannotations on the same element.The annotated element must be a number whose value must be lower or equal to the specified maximum.Defines severalMaxannotations on the same element.The annotated element must be a number whose value must be higher or equal to the specified minimum.Defines severalMinannotations on the same element.The annotated element must be a strictly negative number (i.e. 0 is considered as an invalid value).Defines severalNegativeconstraints on the same element.The annotated element must be a negative number or 0.Defines severalNegativeOrZeroconstraints on the same element.The annotated element must not benulland must contain at least one non-whitespace character.Defines several@NotBlankconstraints on the same element.The annotated element must not benullnor empty.Defines several@NotEmptyconstraints on the same element.The annotated element must not benull.Defines severalNotNullannotations on the same element.The annotated element must benull.Defines severalNullannotations on the same element.The annotated element must be an instant, date or time in the past.Defines severalPastannotations on the same element.The annotated element must be an instant, date or time in the past or in the present.Defines severalPastOrPresentannotations on the same element.The annotatedCharSequencemust match the specified regular expression.Possible Regexp flags.Defines severalPatternannotations on the same element.The annotated element must be a strictly positive number (i.e. 0 is considered as an invalid value).Defines severalPositiveconstraints on the same element.The annotated element must be a positive number or 0.Defines severalPositiveOrZeroconstraints on the same element.The annotated element size must be between the specified boundaries (included).Defines severalSizeannotations on the same element.