You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joel Trunick <jo...@webifysolutions.com> on 2005/02/08 22:38:58 UTC
EmailValidator
Does someone have a better EmailValidator on them? I noticed the default
only checks that an '@' exists, and it currently allows spaces in the
email address.
J
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: EmailValidator
Posted by Eric Schneider <er...@centralparksoftware.com>.
You can check out the apache commons validator package....
http://jakarta.apache.org/commons/validator/apidocs/index.html
I believe it uses the Perl5Utils classes, so their maybe some
additional jars you need along with the stuff that comes w/ the
validator download.
Cheers,
e.
On Feb 8, 2005, at 4:38 PM, Joel Trunick wrote:
>
>
> Does someone have a better EmailValidator on them? I noticed the
> default
> only checks that an '@' exists, and it currently allows spaces in the
> email address.
>
> J
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: EmailValidator
Posted by David Solis <h....@gmail.com>.
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-zA-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>
Regards
On Tue, 08 Feb 2005 12:50:41 -0900, Jubal Skaggs
<ju...@admin.state.ak.us> wrote:
> If you enjoy regular expressions, try this :-)
>
> <bean name="emailaddressValidator"
> class="org.apache.tapestry.valid.PatternValidator">
> <set-property name="required" expression="true"/>
> <set-property name="clientScriptingEnabled" expression="false"/>
> <set-property name="patternNotMatchedMessage" expression="'Invalid
> value for Email Address'"/>
> <set-property name="patternString"
> expression="'^[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\\.[A-Za-z]{2,4}$'"/>
> </bean>
>
>
> Joel Trunick wrote:
>
> >Does someone have a better EmailValidator on them? I noticed the default
> >only checks that an '@' exists, and it currently allows spaces in the
> >email address.
> >
> >J
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: EmailValidator
Posted by Paul Ferraro <pm...@columbia.edu>.
And if you really want to be brave, use JNDI to perform an MX lookup on
the email host...
Paul
Jubal Skaggs wrote:
> If you enjoy regular expressions, try this :-)
>
> <bean name="emailaddressValidator"
> class="org.apache.tapestry.valid.PatternValidator">
> <set-property name="required" expression="true"/>
> <set-property name="clientScriptingEnabled" expression="false"/>
> <set-property name="patternNotMatchedMessage" expression="'Invalid
> value for Email Address'"/>
> <set-property name="patternString"
> expression="'^[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\\.[A-Za-z]{2,4}$'"/>
> </bean>
>
>
>
> Joel Trunick wrote:
>
>> Does someone have a better EmailValidator on them? I noticed the default
>> only checks that an '@' exists, and it currently allows spaces in the
>> email address.
>>
>> J
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: EmailValidator
Posted by Jubal Skaggs <ju...@admin.state.ak.us>.
If you enjoy regular expressions, try this :-)
<bean name="emailaddressValidator"
class="org.apache.tapestry.valid.PatternValidator">
<set-property name="required" expression="true"/>
<set-property name="clientScriptingEnabled" expression="false"/>
<set-property name="patternNotMatchedMessage" expression="'Invalid
value for Email Address'"/>
<set-property name="patternString"
expression="'^[A-Za-z0-9._%-]+@[A-Za-z0-9._%-]+\\.[A-Za-z]{2,4}$'"/>
</bean>
Joel Trunick wrote:
>Does someone have a better EmailValidator on them? I noticed the default
>only checks that an '@' exists, and it currently allows spaces in the
>email address.
>
>J
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org