0 Replies Latest reply on Mar 14, 2007 1:03 PM by idylle test

    Problem with length validator on inputtext

    idylle test Newbie


      I'm using seam 1.2.0PATCH1 with a PostgreSQL Base.
      I've got a problem with Validator Length.

      Here is my entity code :

      @Column(name = "colaff", nullable = false, length = 1)
       @Length(max = 1)
       public char getColaff() {
       return this.colaff;

      Here is my page code :
      <h:outputLabel for="colaff">
       <span class="required">*</span>
       <s:decorate id="colaffDecoration">
       <h:inputText id="colaff"
       <a:support event="onblur" reRender="colaffDecoration" />

      The inputtext "colaff" has to be filled with one character.
      I fill it with one character but I can't validate my form, I have a message "colaff length should be between 0 and 1". If I put a javascript alert to verify the value and length of the input, I have just one character, no hidden character seams to be added to what I typed.

      I really don't understand what's wrong, do you any idea for me please?