Search in sources :

Example 1 with OptionalValidatorFactoryBean

use of org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean in project spring-boot by spring-projects.

the class SpringValidator method create.

private static Validator create() {
    OptionalValidatorFactoryBean validator = new OptionalValidatorFactoryBean();
    validator.setMessageInterpolator(new MessageInterpolatorFactory().getObject());
    return wrap(validator, false);
}
Also used : OptionalValidatorFactoryBean(org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean) MessageInterpolatorFactory(org.springframework.boot.validation.MessageInterpolatorFactory)

Aggregations

MessageInterpolatorFactory (org.springframework.boot.validation.MessageInterpolatorFactory)1 OptionalValidatorFactoryBean (org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean)1