# Package org.springframework.validation.beanvalidation

@NonNullApi @NonNullFields package org.springframework.validation.beanvalidation
Support classes for integrating a JSR-303 Bean Validation provider (such as Hibernate Validator) into a Spring ApplicationContext and in particular with Spring's data binding and validation APIs.

The central class is `LocalValidatorFactoryBean` which defines a shared ValidatorFactory/Validator setup for availability to other Spring components.

Related Packages
Package
Description
org.springframework.validation
Provides data binding and validation functionality, for usage in business and/or UI layers.
org.springframework.validation.annotation
Support classes for annotation-based constraint evaluation, for example, using a JSR-303 Bean Validation provider.
org.springframework.validation.method
Abstractions and support classes for method validation, independent of the underlying validation library.
org.springframework.validation.support
Support classes for handling validation results.
Class
Description
BeanValidationPostProcessor
Simple `BeanPostProcessor` that checks JSR-303 constraint annotations in Spring-managed beans, throwing an initialization exception in case of constraint violations right before calling the bean's init method (if any).
CustomValidatorBean
Configurable bean class that exposes a specific JSR-303 Validator through its original interface as well as through the Spring `Validator` interface.
LocaleContextMessageInterpolator
Delegates to a target `MessageInterpolator` implementation but enforces Spring's managed Locale.
LocalValidatorFactoryBean
This is the central class for `jakarta.validation` (JSR-303) setup in a Spring application context: It bootstraps a `jakarta.validation.ValidationFactory` and exposes it through the Spring `Validator` interface as well as through the JSR-303 `Validator` interface and the `ValidatorFactory` interface itself.
MessageSourceResourceBundleLocator
Implementation of Hibernate Validator 4.3/5.x's `ResourceBundleLocator` interface, exposing a Spring `MessageSource` as localized `MessageSourceResourceBundle`.
MethodValidationAdapter
`MethodValidator` that uses a Bean Validation `Validator` for validation, and adapts `ConstraintViolation`s to `MethodValidationResult`.
MethodValidationAdapter.ObjectNameResolver
Strategy to resolve the name of an `@Valid` method parameter to use for its `BindingResult`.
MethodValidationInterceptor
An AOP Alliance `MethodInterceptor` implementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.
MethodValidationPostProcessor
A convenient `BeanPostProcessor` implementation that delegates to a JSR-303 provider for performing method-level validation on annotated methods.
OptionalValidatorFactoryBean
`LocalValidatorFactoryBean` subclass that simply turns `Validator` calls into no-ops in case of no Bean Validation provider being available.
SpringConstraintValidatorFactory
JSR-303 `ConstraintValidatorFactory` implementation that delegates to a Spring BeanFactory for creating autowired `ConstraintValidator` instances.
SpringValidatorAdapter
Adapter that takes a JSR-303 `javax.validator.Validator` and exposes it as a Spring `Validator` while also exposing the original JSR-303 Validator interface itself.