[
https://issues.jboss.org/browse/RF-12160?page=com.atlassian.jira.plugin.s...
]
Brian Leathem edited comment on RF-12160 at 5/17/12 3:16 PM:
-------------------------------------------------------------
Juraj Huska <jhuska(a)redhat.com> made a comment on [bug
822215|https://bugzilla.redhat.com/show_bug.cgi?id=822215]
Description of problem:
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}
<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.
Version-Release number of selected component (if applicable):
Richfaces 4.2.1.Final
was (Author: jira-bugzilla-migration):
Juraj Huska <jhuska(a)redhat.com> made a comment on [bug
822215|https://bugzilla.redhat.com/show_bug.cgi?id=822215]
Description of problem:
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:
<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>
The model entity field which is validated in the above mentioned input:
@NotNull
@Size(min = 1, max = 25)
@Pattern(regexp = "[A-Za-z ]*", message = "must contain only letters and
spaces")
private String name;
Note that I have tried to reproduce this issue on metamer and I was not successful.
Version-Release number of selected component (if applicable):
Richfaces 4.2.1.Final
Steps to Reproduce:
1. deploy on JBoss AS 7.1.1.Final the project generated by the richfaces kitchen sink
archetype
2. type numbers to the name input, e.g. 444
3. make BLUR on that input, that is, focus other input
4. see that the respective error message did not appear
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
Assignee: 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