We're updating the issue view to help you get more done. 

@Valid doesn't work together with @UnwrapValidatedValue

Description

From the forum:

I have a field in a bean annotated as such:

1 2 3 @UnwrapValidatedValue @Valid private Optional<List<MyCustomType>> stuff = Optional.absent();

I would hope that the @Valid would cause each of the instances of MyCustomType in the List to be validated, but as of yet I have not been able to get that to work. The unwrapping works correctly so that the List itself is validated if I apply @NotNull or other such annotations, but the @Valid annotation does not cause the elements of the list to be validated.

Environment

None

Status

Assignee

Hardy Ferentschik

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

Fix versions

Affects versions

5.1.1.Final

Priority

Major