spring-framework / org.springframework.web.servlet.config.annotation / WebMvcConfigurationSupport / mvcValidator

mvcValidator

@Bean open fun mvcValidator(): Validator

Return a global Validator instance for example for validating @ModelAttribute and @RequestBody method arguments. Delegates to #getValidator() first and if that returns null checks the classpath for the presence of a JSR-303 implementations before creating a OptionalValidatorFactoryBean.If a JSR-303 implementation is not available, a no-op Validator is returned.