0 Replies Latest reply on Oct 11, 2007 11:31 PM by Terry

    Displaying property name in validation message

    Terry Apprentice


      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;
      
      }