title: JSF h:inputFile custom validator is not called
body: <p>I'm building a custom valdiator to do some validations over an uploaded image 
  so I did the following :</p>
  
  <pre><code>&lt;h:form styleClass="form" role="form" prependId="false" enctype="multipart/form-data"&gt;  
            &lt;h:inputFile  styleClass="form-control"  id="slideImage"&gt; 
                   &lt;f:validator validatorId="NewImageValidator"/&gt;
            &lt;/h:inputFile&gt;
  // Rest of form data &amp; components
  &lt;/h:form&gt;
  </code></pre>
  
  <p>NewImageValidator.java</p>
  
  <pre><code>@FacesValidator(value = "NewImageValidator")
  public class NewImageValidator implements Validator {
  
      @Override
      public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
          System.out.println("NewImageValidator");
  
      }
  }
  </code></pre>
  
  <p>The issue is that the validator is never called (NewImageValidator is never printed on output) inside the <code>h:inputFile</code> tried calling the validator inside an <code>h:inputText</code> and it worked just fine
  So what is the wrong with <code>h:inputFile</code> here</p>
  
  <p>Thanks in advance </p>