# Uses of Interface
org.springframework.validation.Validator

Packages that use Validator
Package
Description
org.springframework.validation
Provides data binding and validation functionality, for usage in business and/or UI layers.
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.

## Uses of Validator in org.springframework.validation

Subinterfaces of Validator in org.springframework.validation
Modifier and Type
Interface
Description
`interface`
`SmartValidator`
Extended variant of the `Validator` interface, adding support for validation 'hints'.
Methods in org.springframework.validation that return Validator
Modifier and Type
Method
Description
`static <T> Validator`
Validator.`forInstanceOf(Class<T> targetClass, BiConsumer<T,Errors> delegate)`
Return a `Validator` that checks whether the target object is an instance of `targetClass`, applying the given `delegate` to populate `Errors` if it is.
`static <T> Validator`
Validator.`forType(Class<T> targetClass, BiConsumer<T,Errors> delegate)`
Return a `Validator` that checks whether the target object's class is identical to `targetClass`, applying the given `delegate` to populate `Errors` if it is.
`Validator`
DataBinder.`getValidator()`
Return the primary Validator to apply after each binding step, if any.
Methods in org.springframework.validation that return types with arguments of type Validator
Modifier and Type
Method
Description
`List<Validator>`
DataBinder.`getValidators()`
Return the Validators to apply after data binding.
`List<Validator>`
DataBinder.`getValidatorsToApply()`
Return the Validators to apply after data binding.
Methods in org.springframework.validation with parameters of type Validator
Modifier and Type
Method
Description
`void`
DataBinder.`addValidators(Validator... validators)`
Add Validators to apply after each binding step.
`static void`
ValidationUtils.`invokeValidator(Validator validator, Object target, Errors errors)`
Invoke the given `Validator` for the supplied object and `Errors` instance.
`static void`
ValidationUtils.`invokeValidator(Validator validator, Object target, Errors errors, Object... validationHints)`
Invoke the given `Validator`/`SmartValidator` for the supplied object and `Errors` instance.
`void`
DataBinder.`replaceValidators(Validator... validators)`
Replace the Validators to apply after each binding step.
`void`
DataBinder.`setValidator(Validator validator)`
Set the Validator to apply after each binding step.
Method parameters in org.springframework.validation with type arguments of type Validator
Modifier and Type
Method
Description
`void`
DataBinder.`setExcludedValidators(Predicate<Validator> predicate)`
Configure a predicate to exclude validators.

## Uses of Validator in org.springframework.validation.beanvalidation

Classes in org.springframework.validation.beanvalidation that implement Validator
Modifier and Type
Class
Description
`class`
`CustomValidatorBean`
Configurable bean class that exposes a specific JSR-303 Validator through its original interface as well as through the Spring `Validator` interface.
`class`
`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.
`class`
`OptionalValidatorFactoryBean`
`LocalValidatorFactoryBean` subclass that simply turns `Validator` calls into no-ops in case of no Bean Validation provider being available.
`class`
`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.