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

Introduce a addBeanNode() method to the fluent node builder API

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 final
    • Fix Version/s: 1.1.0.Beta4
    • Component/s: spec-general
    • Labels:
      None
    • Last commented by a user?:
      true

      Description

      In the current, model, to represent "persons[0]", we need to do

      constraintValidatorContext 
          .buildConstraintViolationWithTemplate("constraints.CompatiblePersons.gender.message") 
              .addNode("persons") 
              .addNode(null).inIterable().atIndex(0) 
              .addConstraintViolation(); 
      

      this could be made cleaner with

      constraintValidatorContext 
          .buildConstraintViolationWithTemplate("constraints.CompatiblePersons.gender.message") 
              .addNode("persons") 
              .addEntityNode().inIterable().atIndex(0) 
              .addConstraintViolation(); 
      

        Attachments

          Issue links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: