Juraj Huska created RF-12160:
--------------------------------
Summary: rich:validator does not validate on the client side the
@Pattern constraint
Key: RF-12160
URL: https://issues.jboss.org/browse/RF-12160
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component-validators
Affects Versions: 4.2.1.Final
Environment: application: generated project from
richfaces-kitchensink-archetype 4.2.1-SNAPSHOT
browser: Chrome, Firefox
Reporter: Juraj Huska
When trying to validate input which has annotation based constraint @Pattern,
validation for this constraint is triggered only after the submitting of the
form. The other constraints (@NotNull, @Size) are triggered as expected, after
the BLUR event fired on that input.
The issue is noticeable on the project generated by the kitchensink archetype
with RichFaces 4.2.1-SNAPSHOT libraries.
The facelet for the input validation with pattern annotation-based constraints
looks like:
{code:xml}
<h:panelGrid columns="3" columnClasses="titleCell">
<h:outputLabel for="name" value="Name:"/>
<h:inputText id="name" value="#{cc.attrs.member.name}">
<rich:validator/>
</h:inputText>
<rich:message for="name" errorClass="invalid"/>
</h:panelGrid>
{code}
The model entity field which is validated in the above mentioned input:
{code}
@NotNull
@Size(min = 1, max = 25)
@Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and
spaces")
private String name;
{code}
Note that I have tried to reproduce this issue on metamer and I was not
successful.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues