in my form class I have


@NotEmpty
@Length(min = 5, max = 5)
@Pattern(regexp = "[0-9]+")
private String zip;

I have written custom tag to display one error message . but the get errorMessages() is returning errormessage [].for each and every request I am getting a errormessage[] is not returning the same eror array with same order.

I :

must contain exactly five numeric characters<br/>minimum length is five.<br/>required field.

II

required field. <br/> must contain exactly five numeric characters<br/>minimum length is five.

I need to get a errormessage [] with the same order for every request.