If the constraint is a generic constraint, the following rules apply. If the constraint declaration is hosted on a class or an interface, the targeted type is the class or the interface. If the constraint is hosted on a class attribute, the type of the attribute is the targeted type. If the constraint is hosted on a method (getter or non-getter) or constructor, the return type is the targeted type. If the constraint is hosted on a method or constructor parameter, the parameter type is the targetedtype. If the constraint is hosted o…
When detecting a container element constraint or a container element marked with @Valid
, the value extractor forobtaining the container’s elements must be determined.
On 2 Jun 2017, at 15:35, Emmanuel Bernard <emmanuel@hibernate.org> wrote:_______________________________________________Hey allI could not do much but I promised Gunnar to review one last time the 1.1 -> 2.0 diffI did not find much and dod not checked it all but here is at least a few thingsExample 3.10: Multi-valued constraint declaration using explicit @List annotationI’d put in the example title that it is a discouraged pattern3.3"composing constraints are directly given on the composed constraint” -> "composing constraints are directly given on the composed constraint (i.e. via the repeatable annotation feature)""refers to the left-to-right order” -> I got puzzled by that one especially as we can put them on new lines. I would say “refers to the order in which they are declared”Example 3.21 / 3.24I find it odd to ahve the private method return nullCan we make it a full example?4.1 add an exemple of non generic container usage maybe4.4A value extractor for java.util.Optional:Maybe a comment reminding that the null is passed to have no path node entryMaybe more to come laterEmmanuel
beanvalidation-dev mailing list
beanvalidation-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/beanvalidation-dev