Hi Can any one help me for Hibernate entity validation sample. I have tried using Hibernate Validator 4.2.0 Final Jar Below is my Entity Class
@Entity public class Account implements Serializable, DynaUIEntityDisplayable{
@Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id;
@NotEmpty @Length(min=2,max=8) private String name; @NotEmpty private String displayName;
//Getters and Setters }
When am saving the This Entity With name min Valve "a" that time it is saving in data base but am expecting ConstrainyViolationException
Can any one help me regarding this .
Thanks in Advance,
Regards, Srikanth
|