title: Get validation failure reason for JSF
body: <p>I have a form where I post some data using ajax. Error message back is <code>validationfailed</code>. The reason for that scenario is that I am expecting a number and the user typed in a character. </p>
  
  <p>I can't get this error message to display in . It's as if validation has failed but no reason is given. I tried <code>&lt;p:message&gt;</code> or <code>&lt;h:message&gt;</code>. I can print a diagnostic message by checking  <code>rendered="#{facesContext.validationFailed or not empty facesContext.messageList}"</code></p>
  
  <p>How can I see or show that the validation has failed since  </p>
  
  <pre><code>&lt;p:inputText value="#{bean.vacancies}"
               id="numberWorkersWidgetId"
               maxlength="2"
               /&gt;
  </code></pre>
  
  <p>, was not a number?</p>
  
  <p>Message Panel is as follows</p>
  
  <pre><code>&lt;h:panelGroup id="messagePanelId"&gt;
     &lt;p:messages  showDetail="true" closable="true" autoUpdate="true" globalOnly="true"&gt;
        &lt;p:effect event="load" type="pulsate" delay="800" speed="2000"&gt;
            &lt;f:param name="times" value="1"/&gt;
        &lt;/p:effect&gt;
     &lt;/p:messages&gt;
  
     &lt;p:messages id="workDaysMessageId" showDetail="true" closable="true" autoUpdate="false" globalOnly="false"                                     redisplay="false"&gt;
      &lt;p:effect event="load" type="pulsate" delay="800" speed="2000"&gt;
            &lt;f:param name="times" value="1"/&gt;
      &lt;/p:effect&gt;
   &lt;/p:messages&gt;
  </code></pre>
  
  <p></p>