I’m looking for where I might configure this option in Spring, but I’m not sure this is a part of JSR 303 so much as it is a Hibernate configuration for their own validator implementation. This is important because if I have multiple constraint violations I only want the first one “thrown”.
Share
Assuming you’re using Spring’s
LocalValidatorFactoryBeanto set up your validator, you can specify provider-specific configuration properties within thevalidationPropertyMapattribute.The property name of Hibernate Validator’s fail-fast attribute is “hibernate.validator.fail_fast”, so you would set up your validator like this: