]
Gunnar Morling commented on BVAL-235:
-------------------------------------
Nice to have.
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: