3 Replies Latest reply on Apr 20, 2008 12:33 PM by jpviragine.jpviragine.gmail.com

    Validation question

    schmil.schmidt.codecentric.de

      Hi everyone.


      I've a question about validation and showing validation messages in Seam 2.0.1 GA and JBoss 4.2.2 GA.


      I want to display a custom validation message if a required field is not set. But not by defining a custom text in messages.properties for all missing required values:


      javax.faces.component.UIInput.REQUIRED=custom message for all required fields



      because I want to set explicit messages for each missing property (with hibernate valdation ?). Like:


      @NotNull(message="CardId is required!")
      public String getCardId()
      {
         return cardId;
      }



      Unfortunately I get the custom defined message if there is no value entered on the screen for the specific property.


      <h:inputText id="cardId" value="#{acquisition.cardId}" required="true"/>



      Does anyone know how i can see the specific message ?


      Regards


      Lars