[jboss-user] [JBoss Seam] - Validation messages are inconsistent
ristretto
do-not-reply at jboss.com
Wed Jan 23 18:54:33 EST 2008
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")
|
and then reference the entity in a JFS/Facelets page like this
| <h:messages/>
| <h:inputText value="#{entity.name}" required="true">
| <s:validate/>
| </h:inputText>
|
and then test it, the @NotNull message doesn't doesn't display. I get the default message: {0}: Validation Error: Value is required.
But, when I test it for the Pattern validation, the @Pattern message DOES display!?
I haven't tested using a message.properties, and from what I know, we don't have one (though there could be a default one in a jar somewhere that is setup for NotNull but not Pattern.)
Can anyone clear this up for me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122854#4122854
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122854
More information about the jboss-user
mailing list