'requiredMessage' attribute not working in xhtml form. Error message won't display
<p>I have the following code:</p>

<pre><code>Enter a word:
&lt;h:inputText value="#{testfile1.input}" styleClass="textbox" id="inputID" maxlength="100" required="true" requiredMessage="Input should not be blank"&gt;
        &lt;/h:inputText&gt;
&lt;h:message for="inputID" style="color:red"/&gt;
&lt;a4j:commandButton value="Save" styleClass="button" action="#{testfile1.saveData}"&gt; &lt;/a4j:commandButton&gt;
</code></pre>

<p>The save button doesn't work if the above field is left blank, which is exactly what i want. But i am unable to display any error message.</p>