title: primefaces form multiple validation
body: <p>I have problem to validate more than one component in h:form ... I need to validate these 2 inputText components but if I do it like this:</p>
  
  <pre><code>    &lt;p:inputText id="actionNameInput"
                   title="TO DO"
                   value="#{repositoryBean.newActionName}"
                   label="Action name"
                   required="true"
                   requiredMessage="Action name is missing."&gt;
          &lt;f:validator validatorId="inputTextValidator"/&gt;
          &lt;f:attribute name="input1" value="Action name" /&gt;
      &lt;/p:inputText&gt;
  
      &lt;p:inputText id="identifierInput"
                   title="TO DO"
                   value="#{repositoryBean.newActionRegex}"
                   label="Identifier"
                   required="true"
                   requiredMessage="Identifier is missing."&gt;
          &lt;f:validator validatorId="inputTextValidator"/&gt;
          &lt;f:attribute name="input1" value="Identifier" /&gt;
      &lt;/p:inputText&gt;
  </code></pre>
  
  <p>here is validator class: </p>
  
  <pre><code>@FacesValidator(value = "inputTextValidator")
  
  public class AddActionValidatorInputText implements Validator{
      @Override
      public void validate(FacesContext facesContext, UIComponent uiComponent, Object o) throws ValidatorException {
  
          if(((String)o).length() &lt; 3){
              FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR,
                      uiComponent.getAttributes().get("input1")+" should be longer than 3characters.", null);
              FacesContext.getCurrentInstance().addMessage(null, message);
              throw new ValidatorException(message);
          }
      }
  }
  </code></pre>
  
  <p>it will only validate first inputText ... I have tryied <a href="https://stackoverflow.com/questions/3478133/jsf-validate-two-fields-in-one-time">this</a>, but I cant get values from components(always null) ... I read smthing about seam-faces, but If I applied it, there was some bigger error(like it needs more and more dependecies...) . I do not want to validate it in my bean class. </p>