Clarify that behavior is undefined if legacy @Valid and type argument @Valid are given for same element

Description

1 2 @Valid private final List<@Valid> VisitorWithGroups> visitors;

It's currently not totally clear whether the elements of the visitors list should be validated once or twice. We should clarify this, preferably by explicitly saying that the behavior is undefined (it's not recommended to put both @Valid anyways).

Also "in order to prevent the container elements from being validated twice" might be interpreted in the way that implementations are expected to honor both @Valid, but that's not the spirit of the spec. This is here to say that specific implementations may implement it that way, and to rule out the duplicated validation, only one @Valid should be given.

ML reference: http://lists.jboss.org/pipermail/beanvalidation-dev/2018-March/001437.html

Environment

None

Status

Assignee

Unassigned

Reporter

Gunnar Morling

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Priority

Major