Custom validation message for bean validation
I'm creating a JSF 2-application and I'm trying to use form validation in the bean instead of the faces-page. I'd also like to use a .properties file to store the messages. I looked at this question but I don't think I have the properties-file set up correctly. Let's say I have a bean called User in a package called 'dev': @ManagedBean @SessionScoped public class User implements Serializable { @Pattern(pattern=".+@.+\\.[a-z]+", message="{dev.User.emailAddress}") private String emailAddress; // getter/setter } I've also created a file 'ValidationMessages.properties' in WEB-INF/classes (I'm