According to JIRA HV-5 (
http://opensource.atlassian.com/projects/hibernate/browse/HV-5) there was a patch applied and committed that defined a method of specifying multiple validation rules at the class level:
Code:
import org.hibernate.validator.ValidatorList;
@ValidatorList({
@GenericValidator(validatorClass=AfterValidator.class, parameters = { @Parameter(name="property",value="endDate"), @Parameter(name="after",value="startDate")}, message = "endDate must be after startDate"),
@GenericValidator(validatorClass=AfterValidator.class, parameters = { @Parameter(name="property",value="firstPayment"), @Parameter(name="after",value="startDate")}, message = "firstPayment must be after startDate"),
})
public class Loan {
...
}
I was expecting this to be part of the 3.0.0.GA release but I cannot find the discussed classes anywhere either in the current release of Validator or in SVN. Unfortunately the SVN history doesn't go far enough back to see what happened to the code.
Could anybody shed some light on this? I was looking to use this method to specify cross field validation for a class.
Best Regards,
Chris.