Can anyone explain why I can control the message for @Pattern, but the message for @NotNull is ignored.
Explanation:
If I annotate a field on an @Entity with these annotations
@NotNull(message="field is null") @Pattern("^\W$",message="field not valid")
<h:messages/> <h:inputText value="#{entity.name}" required="true"> <s:validate/> </h:inputText>
This is probably because the required=true means that it hits JSF validation first and therefore the message displayed (and the key you want to change) is the JSF one.
Probably the "javax.faces.component.UIInput.REQUIRED" but do look it up somewhere.