This issue can't be edited
Because it belongs to an archived project. Jira admins can restore projects from the archive.
Clarify that behavior is undefined if legacy @Valid and type argument @Valid are given for same element
Description
Environment
None
Activity
Show:
Assignee
Unassigned
UnassignedReporter
Gunnar Morling
Gunnar MorlingParticipants
Gunnar Morling
Priority
Created March 19, 2018 at 10:32 AM
Updated March 19, 2018 at 10:32 AM
@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