[jboss-user] [EJB 3.0] - Displaying property name in validation message

terryb do-not-reply at jboss.com
Thu Oct 11 23:31:34 EDT 2007


Is there a way to automatically include entity property name in the hibernate validation message specified in faces messages resource.

I tried following but it doesn't substitute for the name attribute.:

validator.notEmpty={name} may not be empty.


class MyEntity {
  | 
  |  ...
  |  @Column(name = "Code", nullable = false, length = 50)
  |  @Length(max = 50)
  |  @NotEmpty
  |  public String getCode() {
  |  return this.code;
  | 
  | }




View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094347#4094347

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094347



More information about the jboss-user mailing list