Uploaded image for project: 'Bean Validation'
  1. BVAL-221

The constraint violation builder cannot put constraint on a top level map key

    Details

    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      From Logan:

      This is a minor thing and maybe tunnel-visioned (I don't know much about the other beans-related specs), but if I do something like this in a ConstraintValidator:

        public boolean isValid(Map<String, String> target, ConstraintValidatorContext context) {
          context.buildConstraintViolationWithTemplate("oh noes")
                              .addNode(somekey)
                              .addConstraintViolation();
          return false;
        }
      

      It would be nice if that resulted in a violation at path someobject.mapproperty[somekey] rather than someobject.mapproperty.somekey.

        Attachments

          Issue links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: