| When making a nested collection subject to cascaded validation:
List<List<Foo>> listOfListsOfFoos;
Is the following sufficient to validate all {{Foo}}s:
List<@Valid List<Foo>> listOfListsOfFoos;
The argument being, that the @Valid usage represents the legacy syntax applied to the inner List. Or should it rather be:
List<@Valid List<@Valid Foo>> listOfListsOfFoos;
I.e. when used on type arguments, @Valid only carries the new semantics. That seems the safer approach. A related question is whether all the @Valid are needed or whether the inner one suffices:
List<List<@Valid Foo>> listOfListsOfFoos;
|