title: How to customize JSF validation error message
body: <p>How can I customize the validation message that appears when validation fails?</p>
  
  <p>Here is the code I have:</p>
  
  <pre><code>&lt;h:form&gt;
      &lt;p&gt;&lt;h:inputText
             id="userNo"
             title="Type a number from 0 to 10:"&gt;
         &lt;f:validateLongRange
             minimum="3"
             maximum="6"/&gt;
         &lt;/h:inputText&gt;
  
         &lt;h:commandButton id="submit" value="Submit"
             action="response"/&gt;
      &lt;/p&gt;
      &lt;h:message showSummary="true" showDetail="false"
          id="errors1"
          for="userNo"/&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>Currently the message looks like this:</p>
  
  <pre><code>j_idt10:userNo: Validation Error: Specified attribute is not between the expected values of 3 and 6. 
  </code></pre>
  
  <p>Which is not particularly user-friendly. </p>