In the current project I am working on the model bean has the phone number in 3 fields but we only would like one spring validation error. Can this be done>
@NotEmpty(message = "Your Question must not be blank.")
@Size(min = 10, max = 200)
private String content;
@NotEmpty(message = "Area Code must not be blank.")
@Size(min = 3, max = 3, message = "Area must be 3 numbers")
private String areacode;
@NotEmpty(message = "Phone Number must not be blank.")
@Size(min = 3, max = 3, message = "phone number first part must be 3 numbers")
private String phone3;
@NotEmpty(message = "Phone Number must not be blank.")
@Size(min = 4, max = 4, message = "Phone number last part must be 4 numbers")
private String phone4;