Q:

How can I validate unique field with struts framework and hibernate?

I am new in struts2 and hibernate. I want to validate mobile no with data base for uniqueness. How can I validate a unique field with struts framework and hibernate? 

A:

Add the validation.
You want to validate to no store some field in DB.
// annotations
@NotNull
private Integer someField;

validation api GA in Hibernate validation.

Regards.

