You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vincent PROSPER <Vi...@Alkinos.com> on 2002/10/18 10:44:22 UTC
[Struts Validator / i18N] accentuated letters with \w pattern dont work
Hi,
In my validation.xml file, I have the following formset tag:
<global>
<constant>
<constant-name>name</constant-name>
<constant-value>^[\w|-|'| ]+$</constant-value>
</constant>
...
</global>
<formset language="fr">
<form name="subscribeForm">
<field property="lastName" depends="required,mask">
<arg0 key="subscribe.field.lastName"/>
<var>
<var-name>mask</var-name>
<var-value>${name}</var-value>
</var>
</field>
...
</form>
</formset>
All works fine, except for accentuated letters which aren't matched by the
regexp ${name}... That is to say, "Rene" works but "René" doesn't!
Could you please help me on this topic?
NB: <html:html locale="true"> is also set in the JSP.
Another question, that has nothing to do with the previous one, except it
also concerns Struts Validator:
How can I remove the <h3>Error</h3><ul>...</ul><hr/> that is generated by
Struts Validator when replacing <html:errors/>? I put error messages besides
each field with a <html:errors property="myField"/>, and it displays that
ugly HTML stuff instead of a simple error message (and also without taking
into account my CSS class...)
Thanks in advance for both answers.
Vince
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>