We're updating the issue view to help you get more done. 

Add a @UniqueElements constraints

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

Environment

None

Status

Assignee

Unassigned

Reporter

Tadhg Pearson

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Minor