i am working on a JSF Projekt with Glassfish. My validation works well but i dont become a custom error message.
//Class = User, package = devteam
@NotEmpty
You are having two problems here. First, the location of the ValidationMessages.properties file. It has to be in the root of the classpath, so move it into WEB-INF/classes Your second problems are the message keys. The default message key for the Pattern constraint for example is {javax.validation.constraints.Pattern.message}. In your case you want to specify the message parameter in the @Pattern annotation:
@Pattern(regexp=".+@.+\\.[a-z]+", message="{devteam.User.emailAddress}")