I am using the rich:ajaxValidator to validate minimum length with event=onBlur to validate a bean field in a form on a rich:modalPanel. I am using the Hibernate Validator to enforce the minimum length. The validation is working properly and gives the message specified if I put a String with fewer than the required characters. This is a Spring Webflow project.
The scenario for the problem is this:
<a4j:commandButton value="Save"
action="#{userDataTable.updateSelectedUser(messageContext)}"
reRender="displayName, userName, phone"
oncomplete="if (#{!messageContext.hasErrorMessages()}) #{rich:component('editPanel')}.hide();" /><h:outputLabel class="requiredField" for="editUsername">Username:</h:outputLabel>
<h:inputText label="Username" id="editUsername"
value="#{userDataTable.modifiedUser.username}" required="true">
<rich:ajaxValidator event="onblur"/>
</h:inputText>
<rich:message for="editUsername">
<ui:include src="/WEB-INF/layouts/inputmsgmarker.xhtml"/>
</rich:message>