2 Replies Latest reply on Jul 17, 2009 4:04 PM by Alexander Smirnov

    bean validation

    Trevor Flanagan Newbie

      I have a question regarding bean validation on a inputtext component (RichFaces 3.3.1). My bean contains the following annotation:

       @Length(min = 3, max = 3, message = "Field must be three characters")
       private String id = null;

      and my jspx contains the following -
      <h:inputText id="currCd"
      required="true" >
      <rich:ajaxValidator id="currCdAjxVal" event="onblur" />

      The problem is that the bean validation for not null only works for me when I have no binding on the inputtext. Once I have a binding the validation only occurs for the length annotation. As a result I have had to add the required attribute to the input text. Why is this the case?