[hibernate-issues] [Hibernate-JIRA] Created: (BVAL-235) Support parameterized payload attributes
Sebastian Thomschke (JIRA)
noreply at atlassian.com
Thu Jul 21 12:00:15 EDT 2011
Support parameterized payload attributes
----------------------------------------
Key: BVAL-235
URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-235
Project: Bean Validation
Issue Type: New Feature
Components: spec-general
Affects Versions: 1.0 final
Reporter: Sebastian Thomschke
JSR303's payload attribute values are limited to class references.
The idea is to allow the specification of an additional String value for each payload declaration allowing more flexible configurations.
For example:
public @interface Payload {
Class< ? > type();
String value();
}
@interface MinLength {
Payload[] payload() default {};
// ...
}
class Account
{
@MinLength(value=4, payload = {
@Payload(type=ErrorCode.class, value="1234"),
@Payload(type=When.class, value="groovy:this.owner != null && this.foobar > 3")
})
String name;
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list