Hi,
I'm working with the Hibernate Validator 4.1 in a JavaEE application (ICEfaces, Hibernate core, EJB3 etc.)
I determine if a property is valid or not with the following code:
Code:
@SuppressWarnings("unchecked")
ClassValidator classValidator = new ClassValidator(validatedBean.getClass());
@SuppressWarnings("unchecked")
InvalidValue[] validationMessages = classValidator.getInvalidValues(validatedBean, validatedProperty);
But I want to determine which annotation threw the error message if there are more than one annotation for the same property.
Is this possible? And how?
Many thanks