Uploaded image for project: 'Hibernate Validator'
  1. HV-895

@Valid doesn't work together with @UnwrapValidatedValue

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.1.Final
    • Fix Version/s: 5.2.0.Alpha1
    • Component/s: None
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      From the forum:

      I have a field in a bean annotated as such:

      @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.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: