Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0.5.Final
    • Component/s: validators
    • Labels:
      None

      Description

      I've been using HV in several projects for the last few years, commonly to validate inputs to a REST API. One common need I've had is a validator to ensure that the items in an incoming array are unique.
      Because XML & JSON don't have a set type, JAX-RS always deserializes these to a list. When you then convert them to a set (with, for example, new HashSet(list) ), the duplicate items (same equals) are silently dropped. This behavior is often surprising to developers and end-users alike. It's much better to raise a validation exception, highlighting the duplicate items for the API consumer to correct them - a good use case for a validator!
      I have such a validator that I reuse anyway, and would be happy to give something back to the HV project, if you think it would be useful

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: