As promised in the last post implicit grouping is now available. On top of this the metadata API is now in sync with the current spec and there is a JPA 2 aware TraversableResolver. @Valid supports now Iterables and the cascading algorithm follows the new graph navigation rules. In the previous releases an object instance would only be validated once per group. Now this instance can be validated once per group AND validation path. Lets look at the object graph below to illustrate the change:
Assuming a @NotNull constraint on Address.addressLine validating the shown Order instance against the default group will now result in three ConstraintViolations differing only in the property path. The paths are:
Previously only one ConstraintViolation would have returned and it was not defined which property path it would contain. Last but not least the ConstraintValidator resolution algorithm got revamped and works now with generics. This allows support for constructs like:
Collection<? extends Number> element;
For further information about this release refer to the Jira change log and please provide us with some feedback.