jakarta.validation.Validator instances. Adds additional configuration options to those
provided by ValidatorContext.
| Modifier and Type | Method and Description |
|---|---|
| public HibernateValidatorContext | addValueExtractor(ValueExtractor<?>
value extractor implementation extractor)Redeclares jakarta. Validator.
|
| public HibernateValidatorContext | Returns: this following the chaining method patternflag determining whether validation will allow multiple cascaded validation on return values. allow)Define whether more than one constraint on a return value may be marked for cascading validation are allowed. |
| public HibernateValidatorContext | Returns: this following the chaining method patternflag determining whether validation will allow overriding to alter parameter constraints. allow)Define whether overriding methods that override constraints should throw a |
| public HibernateValidatorContext | Returns: this following the chaining method patternflag determining whether validation will allow parameter constraints in parallel hierarchies allow)Define whether parallel methods that define constraints should throw a |
| public HibernateValidatorContext | clockProvider(ClockProvider
ClockProvider implementationRedeclares jakarta. ClockProvider implementation used by the Validator.
|
| public HibernateValidatorContext | constraintValidatorFactory(ConstraintValidatorFactory
the factory)ConstraintValidatorFactory used by the ValidatorRedeclares jakarta. Validator.
|
| public HibernateValidatorContext | Returns: this following the chaining method patternthe payload passed to constraint validators constraintValidatorPayload)Define a payload passed to the constraint validators. |
| public HibernateValidatorContext | Returns: this following the chaining method patternflag determining whether per validation call caching is enabled for enabled)TraversableResolver
results.Define whether the per validation call caching of |
| public HibernateValidatorContext | Returns: this following the chaining method patterntrue to enable fail fast, false otherwise.En- or disables the fail fast mode. |
| public HibernateValidatorContext | messageInterpolator(MessageInterpolator
the messageInterpolator)MessageInterpolator used by the
ValidatorRedeclares jakarta. Validator.
|
| public HibernateValidatorContext | parameterNameProvider(ParameterNameProvider
parameter name provider implementation. parameterNameProvider)Redeclares jakarta. Validator.
|
| public HibernateValidatorContext | Returns: this following the chaining method patterntrue to show the values at trace level, false otherwise.Define whether values that are currently being validated should be part of the logging at trace level, or not. |
| public HibernateValidatorContext | Returns: this following the chaining method patternthe tolerance temporalValidationTolerance)Define the temporal validation tolerance i.e. the acceptable margin of error when comparing date/time in temporal constraints. |
| public HibernateValidatorContext | traversableResolver(TraversableResolver
the traversableResolver)TraversableResolver used by the
ValidatorRedeclares jakarta. Validator.
|
| addValueExtractor | back to summary |
|---|---|
| public HibernateValidatorContext addValueExtractor(ValueExtractor<?> extractor) Redeclares jakarta. Doc from jakarta. Adds a value extractor to be used by the
| |
| allowMultipleCascadedValidationOnReturnValues | back to summary |
|---|---|
| public HibernateValidatorContext allowMultipleCascadedValidationOnReturnValues(boolean allow) Define whether more than one constraint on a return value may be marked for cascading validation are allowed.
The default value is See Section 4.5.5 of the JSR 380 specification, specifically "One must not mark a method return value for cascaded validation more than once in a line of a class hierarchy. In other words, overriding methods on sub types (be it sub classes/interfaces or interface implementations) cannot mark the return value for cascaded validation if the return value has already been marked on the overridden method of the super type or interface."
| |
| allowOverridingMethodAlterParameterConstraint | back to summary |
|---|---|
| public HibernateValidatorContext allowOverridingMethodAlterParameterConstraint(boolean allow) Define whether overriding methods that override constraints should throw a See Section 4.5.5 of the JSR 380 specification, specifically "In sub types (be it sub classes/interfaces or interface implementations), no parameter constraints may be declared on overridden or implemented methods, nor may parameters be marked for cascaded validation. This would pose a strengthening of preconditions to be fulfilled by the caller."
| |
| allowParallelMethodsDefineParameterConstraints | back to summary |
|---|---|
| public HibernateValidatorContext allowParallelMethodsDefineParameterConstraints(boolean allow) Define whether parallel methods that define constraints should throw a See Section 4.5.5 of the JSR 380 specification, specifically "If a sub type overrides/implements a method originally defined in several parallel types of the hierarchy (e.g. two interfaces not extending each other, or a class and an interface not implemented by said class), no parameter constraints may be declared for that method at all nor parameters be marked for cascaded validation. This again is to avoid an unexpected strengthening of preconditions to be fulfilled by the caller."
| |
| clockProvider | back to summary |
|---|---|
| public HibernateValidatorContext clockProvider(ClockProvider clockProvider) Redeclares jakarta. Doc from jakarta. Defines the
| |
| constraintValidatorFactory | back to summary |
|---|---|
| public HibernateValidatorContext constraintValidatorFactory(ConstraintValidatorFactory factory) Redeclares jakarta. Doc from jakarta. Defines the constraint validator factory implementation used by the
| |
| constraintValidatorPayload | back to summary |
|---|---|
| public HibernateValidatorContext constraintValidatorPayload(Object constraintValidatorPayload) Define a payload passed to the constraint validators. If the method is called multiple times, only the payload passed last will be propagated.
| |
| enableTraversableResolverResultCache | back to summary |
|---|---|
| public HibernateValidatorContext enableTraversableResolverResultCache(boolean enabled) Define whether the per validation call caching of
This behavior was initially introduced to cache the
| |
| failFast | back to summary |
|---|---|
| public HibernateValidatorContext failFast(boolean failFast) En- or disables the fail fast mode. When fail fast is enabled the validation will stop on the first constraint violation detected.
| |
| messageInterpolator | back to summary |
|---|---|
| public HibernateValidatorContext messageInterpolator(MessageInterpolator messageInterpolator) Redeclares jakarta. Doc from jakarta. Defines the message interpolator implementation used by the
If not set or if
| |
| parameterNameProvider | back to summary |
|---|---|
| public HibernateValidatorContext parameterNameProvider(ParameterNameProvider parameterNameProvider) Redeclares jakarta. Doc from jakarta. Defines the parameter name provider implementation used by the
| |
| showValidatedValuesInTraceLogs | back to summary |
|---|---|
| public HibernateValidatorContext showValidatedValuesInTraceLogs(boolean enabled) Define whether values that are currently being validated should be part of the logging at trace level, or not.
| |
| temporalValidationTolerance | back to summary |
|---|---|
| public HibernateValidatorContext temporalValidationTolerance(Duration temporalValidationTolerance) Define the temporal validation tolerance i.e. the acceptable margin of error when comparing date/time in temporal constraints.
| |
| traversableResolver | back to summary |
|---|---|
| public HibernateValidatorContext traversableResolver(TraversableResolver traversableResolver) Redeclares jakarta. Doc from jakarta. Defines the traversable resolver implementation used by the
If not set or if
| |