You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2005/02/09 18:05:04 UTC
Might want to use getMessage instead of hard coded strings (
was: EmailValidator)
David,
Just as an aside, you might want to change your set-property for the name to
something like:
<set-property name="patternNotMatchedMessage">
getMessage('patternNotMatchedMessage')
</set-property>
The set-property is an ognl expression, this means it can use the resources
available on the page. One of the most useful is the getMessage() routine
which will get a i18n message from the bundles associated with the page.
Richard
-----Original Message-----
From: David Solis [mailto:h.jr72xeofj9u@gmail.com]
Sent: Wednesday, February 09, 2005 8:31 AM
To: Tapestry users
Subject: Re: EmailValidator
Our email validator is:
<bean name="emailValidator" lifecycle="render"
class="org.apache.tapestry.valid.PatternValidator">
<set-property name="patternString">
"^([0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-z
A-Z]{2,9})$"
</set-property>
<set-property name="patternNotMatchedMessage">
"El correo electrónico no es válido.
Por favor ingrese una dirección de correo válida
como por ejemplo: msolis@ixemail.com.mx
Direcciones de correo como msolis@148.233.14.177 no son
permitidas."
</set-property>
</bean>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org