I have a field, say, user_name, that should be unique in a table.
user_name
What is the best way for validating it using Spring/Hibernate validation?
One possibility is to annotate the field as @NaturalId