Should not be used directly, prefer HibernateValidatorConfiguration or
PredefinedScopeHibernateValidatorConfiguration.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ALLOW_MULTIPLE_CASCADED_VALIDATION_ON_RESULT
Property corresponding to the |
| public static final String | ALLOW_PARALLEL_METHODS_DEFINE_PARAMETER_CONSTRAINTS
Property corresponding to the |
| public static final String | ALLOW_PARAMETER_CONSTRAINT_OVERRIDE
Property corresponding to the |
| public static final String | CONSTRAINT_EXPRESSION_LANGUAGE_FEATURE_LEVEL
Property for configuring the Expression Language feature level for constraints, allowing to define which Expression Language features are available for message interpolation. |
| public static final String | CONSTRAINT_MAPPING_CONTRIBUTOR
Deprecated
planned for removal. Use hibernate.validator.constraint_mapping_contributors instead.
|
| public static final String | CONSTRAINT_MAPPING_CONTRIBUTORS
Property for configuring constraint mapping contributors, allowing to set up one or more constraint mappings for the default validator factory. |
| public static final String | CUSTOM_VIOLATION_EXPRESSION_LANGUAGE_FEATURE_LEVEL
Property for configuring the Expression Language feature level for custom violations, allowing to define which Expression Language features are available for message interpolation. |
| public static final String | ENABLE_TRAVERSABLE_RESOLVER_RESULT_CACHE
Property corresponding to the |
| public static final String | |
| public static final String | GETTER_PROPERTY_SELECTION_STRATEGY_CLASSNAME
Property for configuring the getter property selection strategy, allowing to set which rules will be applied to determine if a method is a valid JavaBean getter. |
| public static final String | LOCALE_RESOLVER_CLASSNAME
Property for configuring the locale resolver, allowing to select an implementation of |
| public static final String | PROPERTY_NODE_NAME_PROVIDER_CLASSNAME
Property for configuring the property node name provider, allowing to select an implementation of |
| public static final String | SCRIPT_EVALUATOR_FACTORY_CLASSNAME
Property for configuring the script evaluator factory, allowing to set up which factory will be used to create
|
| public static final String | SHOW_VALIDATED_VALUE_IN_TRACE_LOGS
Property for trace level logs to include values under validation when constraint checks are executed. |
| public static final String | TEMPORAL_VALIDATION_TOLERANCE
Property for configuring temporal validation tolerance, allowing to set the acceptable margin of error when comparing date/time in temporal constraints. |
| Modifier and Type | Method and Description |
|---|---|
| public S | Returns: this following the chaining method patternConstraintMapping instance containing programmatic configured constraintsAdds the specified |
| public S | 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 S | 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 S | 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 S | |
| public S | Returns: this following the chaining method patternthe expressionLanguageFeatureLevel)ExpressionLanguageFeatureLevel to be usedAllows setting the Expression Language feature level for message interpolation of constraint messages. |
| public S | Returns: this following the chaining method patternthe payload passed to constraint validators constraintValidatorPayload)Allows to set a payload which will be passed to the constraint validators. |
| public ConstraintMapping | Returns: A new constraint mapping.Creates a new constraint mapping which can be used to programmatically configure the constraints for given types. |
| public S | Returns: this following the chaining method patternthe expressionLanguageFeatureLevel)ExpressionLanguageFeatureLevel to be usedAllows setting the Expression Language feature level for message interpolation of custom violation messages. |
| public S | defaultLocale(Locale defaultLocale)
Allows setting the default locale used to interpolate the constraint violation messages. |
| public S | 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 S | Returns: this following the chaining method patternThe class loader for loading user-provided resources. externalClassLoader)Sets the class loader to be used for loading user-provided resources:
|
| public S | Returns: this following the chaining method patterntrue to enable fail fast, false otherwise.En- or disables the fail fast mode. |
| public ResourceBundleLocator | Returns: The defaultResourceBundleLocator. Never null.
Returns the |
| public Set | Returns: the defaultValueExtractor implementations compliant
with the specificationReturns the default |
| public S | Returns: this following the chaining method patternthe getterPropertySelectionStrategy)GetterPropertySelectionStrategy to be usedAllows to set a getter property selection strategy defining the rules determining if a method is a getter or not. |
| public S | Returns: this following the chaining method patternthe localeResolver)LocaleResolver to be usedAllows setting a locale resolver, defining how the locale will be resolved when interpolating the message of a constraint violation. |
| public S | |
| public default S | |
| public S | Returns: this following the chaining method patternthe propertyNodeNameProvider)PropertyNodeNameProvider to be usedAllows to set a property node name provider, defining how the name of a property node will be resolved
when constructing a property path as the one returned by |
| public S | Returns: this following the chaining method patternthe scriptEvaluatorFactory)ScriptEvaluatorFactory to be usedAllows to specify a custom |
| public S | Returns: this following the chaining method patternflag determining whether validated values will be printed out into trace level logs or not. enabled)Allows setting the logging configuration that would include validated values in trace level logs. |
| public S | Returns: this following the chaining method patternthe acceptable tolerance temporalValidationTolerance)Allows to set the acceptable margin of error when comparing date/time in temporal constraints such as
|
| ALLOW_MULTIPLE_CASCADED_VALIDATION_ON_RESULT | back to summary |
|---|---|
| public static final String ALLOW_MULTIPLE_CASCADED_VALIDATION_ON_RESULT Property corresponding to the | |
| ALLOW_PARALLEL_METHODS_DEFINE_PARAMETER_CONSTRAINTS | back to summary |
|---|---|
| public static final String ALLOW_PARALLEL_METHODS_DEFINE_PARAMETER_CONSTRAINTS Property corresponding to the | |
| ALLOW_PARAMETER_CONSTRAINT_OVERRIDE | back to summary |
|---|---|
| public static final String ALLOW_PARAMETER_CONSTRAINT_OVERRIDE Property corresponding to the | |
| CONSTRAINT_EXPRESSION_LANGUAGE_FEATURE_LEVEL | back to summary |
|---|---|
| public static final String CONSTRAINT_EXPRESSION_LANGUAGE_FEATURE_LEVEL Property for configuring the Expression Language feature level for constraints, allowing to define which Expression Language features are available for message interpolation.
This property only affects the EL feature level of "static" constraint violation messages. In particular, it
doesn't affect the default EL feature level for custom violations. Refer to
| |
| CONSTRAINT_MAPPING_CONTRIBUTOR | back to summary |
|---|---|
| public static final String CONSTRAINT_MAPPING_CONTRIBUTOR
Deprecated planned for removal. Use hibernate.validator.constraint_mapping_contributors instead.
| |
| CONSTRAINT_MAPPING_CONTRIBUTORS | back to summary |
|---|---|
| public static final String CONSTRAINT_MAPPING_CONTRIBUTORS Property for configuring constraint mapping contributors, allowing to set up one or more constraint mappings for
the default validator factory. Accepts a String with the comma separated fully-qualified class names of one or more
| |
| CUSTOM_VIOLATION_EXPRESSION_LANGUAGE_FEATURE_LEVEL | back to summary |
|---|---|
| public static final String CUSTOM_VIOLATION_EXPRESSION_LANGUAGE_FEATURE_LEVEL Property for configuring the Expression Language feature level for custom violations, allowing to define which Expression Language features are available for message interpolation.
| |
| ENABLE_TRAVERSABLE_RESOLVER_RESULT_CACHE | back to summary |
|---|---|
| public static final String ENABLE_TRAVERSABLE_RESOLVER_RESULT_CACHE Property corresponding to the
| |
| FAIL_FAST | back to summary |
|---|---|
| public static final String FAIL_FAST Property corresponding to the | |
| GETTER_PROPERTY_SELECTION_STRATEGY_CLASSNAME | back to summary |
|---|---|
| public static final String GETTER_PROPERTY_SELECTION_STRATEGY_CLASSNAME Property for configuring the getter property selection strategy, allowing to set which rules will be applied to determine if a method is a valid JavaBean getter.
| |
| LOCALE_RESOLVER_CLASSNAME | back to summary |
|---|---|
| public static final String LOCALE_RESOLVER_CLASSNAME Property for configuring the locale resolver, allowing to select an implementation of
| |
| PROPERTY_NODE_NAME_PROVIDER_CLASSNAME | back to summary |
|---|---|
| public static final String PROPERTY_NODE_NAME_PROVIDER_CLASSNAME Property for configuring the property node name provider, allowing to select an implementation of
| |
| SCRIPT_EVALUATOR_FACTORY_CLASSNAME | back to summary |
|---|---|
| public static final String SCRIPT_EVALUATOR_FACTORY_CLASSNAME Property for configuring the script evaluator factory, allowing to set up which factory will be used to create
| |
| SHOW_VALIDATED_VALUE_IN_TRACE_LOGS | back to summary |
|---|---|
| public static final String SHOW_VALIDATED_VALUE_IN_TRACE_LOGS Property for trace level logs to include values under validation when constraint checks are executed.
| |
| TEMPORAL_VALIDATION_TOLERANCE | back to summary |
|---|---|
| public static final String TEMPORAL_VALIDATION_TOLERANCE Property for configuring temporal validation tolerance, allowing to set the acceptable margin of error when comparing date/time in temporal constraints. In milliseconds.
| |
| addMapping | back to summary |
|---|---|
| public S addMapping(ConstraintMapping mapping) Adds the specified
| |
| allowMultipleCascadedValidationOnReturnValues | back to summary |
|---|---|
| public S 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 S 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 S 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."
| |
| beanMetaDataClassNormalizer | back to summary |
|---|---|
public S beanMetaDataClassNormalizer(BeanMetaDataClassNormalizer beanMetaDataClassNormalizer)
| |
| constraintExpressionLanguageFeatureLevel | back to summary |
|---|---|
| public S constraintExpressionLanguageFeatureLevel(ExpressionLanguageFeatureLevel expressionLanguageFeatureLevel) Allows setting the Expression Language feature level for message interpolation of constraint messages. This is the feature level used for messages hardcoded inside the constraint declaration. If you are creating custom constraint violations, Expression Language support needs to be explicitly enabled and use the safest feature level by default if enabled.
| |
| constraintValidatorPayload | back to summary |
|---|---|
| public S constraintValidatorPayload(Object constraintValidatorPayload) Allows to set a payload which will be passed to the constraint validators. If the method is called multiple times, only the payload passed last will be propagated.
| |
| createConstraintMapping | back to summary |
|---|---|
| public ConstraintMapping createConstraintMapping() Creates a new constraint mapping which can be used to programmatically configure the constraints for given types. After
the mapping has been set up, it must be added to this configuration via
| |
| customViolationExpressionLanguageFeatureLevel | back to summary |
|---|---|
| public S customViolationExpressionLanguageFeatureLevel(ExpressionLanguageFeatureLevel expressionLanguageFeatureLevel) Allows setting the Expression Language feature level for message interpolation of custom violation messages.
This is the feature level used for messages of custom violations created by the
| |
| defaultLocale | back to summary |
|---|---|
| public S defaultLocale(Locale defaultLocale) Allows setting the default locale used to interpolate the constraint violation messages.
If not set, defaults to the system locale obtained via
| |
| enableTraversableResolverResultCache | back to summary |
|---|---|
| public S enableTraversableResolverResultCache(boolean enabled) Define whether the per validation call caching of
This behavior was initially introduced to cache the
| |
| externalClassLoader | back to summary |
|---|---|
| public S externalClassLoader(ClassLoader externalClassLoader) Sets the class loader to be used for loading user-provided resources:
| |
| failFast | back to summary |
|---|---|
| public S 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.
| |
| getDefaultResourceBundleLocator | back to summary |
|---|---|
| public ResourceBundleLocator getDefaultResourceBundleLocator()
Returns the
This locator can be used as delegate for custom locators when setting a
customized
| |
| getDefaultValueExtractors | back to summary |
|---|---|
| public Set Returns the default
| |
| getterPropertySelectionStrategy | back to summary |
|---|---|
| public S getterPropertySelectionStrategy(GetterPropertySelectionStrategy getterPropertySelectionStrategy) Allows to set a getter property selection strategy defining the rules determining if a method is a getter or not.
| |
| localeResolver | back to summary |
|---|---|
| public S localeResolver(LocaleResolver localeResolver) Allows setting a locale resolver, defining how the locale will be resolved when interpolating the message of a constraint violation.
| |
| locales | back to summary |
|---|---|
| public S locales(Set<Locale> locales) Allows setting the list of the locales supported by this ValidatorFactory. Can be used for advanced locale resolution and/or to force the initialization of the resource bundles at bootstrap.
If not set, defaults to a singleton containing
| |
| locales | back to summary |
|---|---|
| public default S locales(Locale... locales) Allows setting the list of the locales supported by this ValidatorFactory. Can be used for advanced locale resolution and/or to force the initialization of the resource bundles at bootstrap.
If not set, defaults to a singleton containing
| |
| propertyNodeNameProvider | back to summary |
|---|---|
| public S propertyNodeNameProvider(PropertyNodeNameProvider propertyNodeNameProvider) Allows to set a property node name provider, defining how the name of a property node will be resolved
when constructing a property path as the one returned by
| |
| scriptEvaluatorFactory | back to summary |
|---|---|
| public S scriptEvaluatorFactory(ScriptEvaluatorFactory scriptEvaluatorFactory) Allows to specify a custom
| |
| showValidatedValuesInTraceLogs | back to summary |
|---|---|
| public S showValidatedValuesInTraceLogs(boolean enabled) Allows setting the logging configuration that would include validated values in trace level logs. By default, values will not be printed to the logs as they might contain sensitive data.
| |
| temporalValidationTolerance | back to summary |
|---|---|
| public S temporalValidationTolerance(Duration temporalValidationTolerance) Allows to set the acceptable margin of error when comparing date/time in temporal constraints such as
| |