|
@Lorber Sebastien: Hi Lorber, there is already BVAL-202 for this feature. I'm going to close this one as duplicate.
So far we haven't been able to find a suitable solution except for waiting for type parameter annotations as supported by JSR-308/JDK 8 which will allow to express the intention as follows:
private List<@Email String> emails;
We will hopefully be able to provide support for this in the reference implementation some time soon after JDK 8 is out.
The problem with @Valid({@Email}) is that this is not really possible in Java, since there can't be an annotation member (simple or array) which accepts any type of annotation, you only can declare members of a specific annotation type (or an array thereof). Hence one would need a specific @Valid annotation for each constraint.
|