This is part of my registration page:
<a4j:form> <h:panelGrid columns="2" cellpadding="3" cellspacing="3"> <h:outputLabel for="name" value="#{msg['register.name']}"/> <h:panelGroup> <h:inputText id="name" value="#{registrationBean.user.name}" maxlength="50" required="true"/> <rich:message for="name"> <f:facet name="passedMarker"> <h:graphicImage value="/images/passed.gif" styleClass="richMsg"/> </f:facet> <f:facet name="errorMarker"> <h:graphicImage value="/images/error.gif" styleClass="richMsg"/> </f:facet> </rich:message> </h:panelGroup> <h:panelGroup/> <h:panelGroup> <a4j:commandButton type="submit" value="#{msg['register.submit']}" action="#{registrationBean.register}" actionListener="#{registrationBean.submitPressed}"/> <a4j:commandButton type="reset" value="#{msg['register.reset']}" immediate="true"/> </h:panelGroup> </h:panelGrid> </a4j:form>
check graphValidator sample at richfaces-demo