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?
You could use the @Column attribute which can be set as unique.
@Column
unique