Assuming you are using Spring LocalValidatorFactoryBean
to configure your validator, you can specify vendor-specific configuration parameters in the validationPropertyMap
attribute.
The fail-fast attribute property name of the Hibernate Validator is "hibernate.validator.fail_fast", so you should configure your validator as follows:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd"> <bean name="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"> <property name="validationPropertyMap"> <util:map> <entry key="hibernate.validator.fail_fast" value="true"/> </util:map> </property> </bean> </beans>
source share