title: Displaying custom error message for a blank field in a simple JSF application
body: <p>I was trying out a simple JSF application, in which I need to check if the "name" field is blank, then display an error message.</p>
  
  <p>The code which takes the field's value is:</p>
  
  <pre><code>&lt;h:outputLabel value="Name"/&gt;
  &lt;h:inputText value="#{greeting.name}" required="true"&gt;
      &lt;f:validator validatorId="NumValidator"/&gt;
  &lt;/h:inputText&gt;
  </code></pre>
  
  <p>The control of the program does not go into the validator class, if the field is submitted without entering anything, and it displays the default error message: </p>
  
  <p><strong>j_id_jsp_869892673_1:j_id_jsp_869892673_4: Validation Error: Value is required.</strong> </p>
  
  <p>How do i display a custom message for this ? </p>