When I attempt to validate (@Valid) a POJO with a child POJO, the
validation works correctly:
public class POJO {
public POJO2 someMemberIWantValidatedToo;
}
However, if POJO2 is in a collection, it seems to get skipped over:
public class POJO {
public List<POJO2> lotsOfMembersIWantValidated;
}
Is this a bug or is there another way of doing this that I'm unaware
of? I tried to write my own custom validator (
http://pastebin.com/
ggwQgWDP), but I cannot create the proper error key because
ValidationPlugin.keys is package private (probably as it should be).
Outside of a custom validator, I'm not sure how to handle this unless
we make the @Valid annotation applicable to classes too.