Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-5088

AddressValidator should return true on null in bean-validation-custom-constraint QS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.DR1
    • 7.0.0.GA
    • Quickstarts
    • None

      Bean Validation 1.1 spec says:
      While not mandatory, it is considered a good practice to split the core constraint validation from the not null constraint validation (for example, an @Email constraint will return true on a null object, i.e. will not take care of the @NotNull validation).

      I suggest to change bean-validation-custom-constrain QS to be consistent with this recommendation:

      1. AddressValidator should return true on null
      2. @NotNull should be added to values where @Address must not be null

              sgilda_jira Sande Gilda (Inactive)
              nziakova@redhat.com Nikoleta Ziakova (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: