I have an entoty bean with a property that has a max 255 length. I want to
customize the default hibernate validator.length message, in order to display
only the max value, not the min value (default validator.length is defined as
'length must be between {min} and {max}').
So I have this code:
| @Length(max=255, message="#{messages['validator.length.maxonly']}")
| @Column(name = "Description", unique = false, nullable = false, insertable
= true, updatable = true)
| public String getDescription() {
| return this.description;
| }
|
in messages_en.properties, the key is defined like this
validator.length.maxonly=length must be less or equal than {max}
The problem is that {max} is not replaced at runtime with 255.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4081226#4081226
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4081226
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user