[jboss-user] [JBoss Seam] - Re: i18n entity validation message?
nhpvti
do-not-reply at jboss.com
Mon Sep 4 06:26:41 EDT 2006
"mosabua" wrote :
| @NotNull
| @Length(min = 2, message="{person.lastName.length}"))
| public String getLastName()
| {
| return lastName;
| }
|
|
A seam-gen generated scaffold application relies only on the Seam properties files, for example :
@NotNull
@Length(min = 1, max = 50, message = "#{messages['err.fullname.length']}")
public String getFullname()
{
return fullname;
}
According entry in a properties file can look so:
err.fullname.length = Fullname is mandatory and should be maximal 50 characters long
The problem is obvious: max length information is spread among two places :-(
The following form unfortunately doesn't work
err.fullname.length = Fullname is mandatory and should be maximal {max} characters long
I suppose this could be a feature request: Seam messages must be able to interpret hibernate-validator alike variables {max}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969198#3969198
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969198
More information about the jboss-user
mailing list