3 Replies Latest reply on Oct 31, 2007 9:16 AM by Pete Muir

    Seam + Hibernate-Validator validation problem

    Marc Lustig Newbie

      Following the Seam-manual we are experiencing trouble to get validation running with Seam 2.0.CR2/Icefaces 1.6.1


      <ice:outputLabel for="firstName" value="Vorname" />
      <ice:inputText id="firstName" value="#{checkoutCart.bean.firstName}" required="true"/>
      <br/><h:message for="firstName" />

      @Pattern(regex="^[a-zA-Z.-]+", message="Fehlender oder ungültiger Nachname")
      public String getFirstName() {
       return firstName;

      With this code, leaving the field _blank_ results in "value is required"-message, coming from the JSF-implementation. The custom message "Fehlender..." is ignored.
      If an _invalid_ value is entered, the correct error-message appears

      <h:message for="firstName" />

      <s:message for="firstName" />
      doesnt change anything.

      Obviously, using required="true" prevents Seam from handling the validation. Any solution for this available, or better to use standard-JSF validation?