Composite constraints have to honour the payload parameter as well
------------------------------------------------------------------
Key: HV-183
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-183
Project: Hibernate Validator
Issue Type: Bug
Components: engine
Affects Versions: 4.0.0.Beta1
Reporter: Hardy Ferentschik
Assignee: Hardy Ferentschik
i tested the current payload impl.
it works for simple constraints - e.g.:
@NotNull(payload = Severity.Warn.class)
but it doesn't work for composite constraints - e.g.:
@NickName(payload = Severity.Warn.class)
with the following workaround it works:
@NotNull
@Size
//...
public @interface NickName {
@OverridesAttribute.List({
@OverridesAttribute(constraint = NotNull.class, name = "payload"),
@OverridesAttribute(constraint = Size.class, name = "payload")
})
Class<? extends ConstraintPayload>[] payload() default {};
//...
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira