You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com> on 2002/09/13 10:09:50 UTC

[SUMMARY] form validator and matches-regex problem

PLease, to be clear, then the email validator can be:

matches-regex="^[\d\w][\d\w\-_\.]*@([\d\w\-_]+\.)\w\w\w?\w?$"/>
                                                                          ^^^
This will check for example: .com .ni and .info?

Its that right? 

Antonio Gallardo

> Er, watch out: there are TDLs that have 2 characters (the 
> country codes) and others that have 4 (.info).


El Viernes, 30 de Agosto de 2002 14:17, Barbara Post escribió:
> Thanks Andre, you're right. :-)

--
website: www.babsfrance.fr.st
ICQ #: 135868405
----- Original Message ----- 
From: "Andre Thenot" <at...@thenot.net>
To: <co...@xml.apache.org>
Sent: Friday, August 30, 2002 4:20 PM
Subject: Re: form validator and regexp problem...


> On Friday, August 30, 2002, at 09:36 , Barbara Post wrote:
> 
> > I use the regexp expression from C 2.0.3 form validator example 
> > and want to
> > validate 2 email fields :
> >
> > in the descriptor :
> >
> >  <parameter name="emailTo" nullable="no" type="string"
> > matches-regexp="^[\d\w][\d\w\-_\.]*@([\d\w\-_]+\.)\w\w\w?$"/>
>                                                      ^^^^^^
> Er, watch out: there are TDLs that have 2 characters (the 
> country codes) and others that have 4 (.info).
> 
> A.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [SUMMARY] form validator and matches-regex problem

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Thanks Ivan, it works fine!

Antonio Gallardo

El Viernes, 13 de Septiembre de 2002 03:46, Ivan Luzyanin escribió:
> Hi!
>
> Try matches-regex="^[\d\w][\d\w\-_\.]*@([\d\w\-_]+\.)+(\w){2,4}$"/>
>
> Best regards!
> Ivan.
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [SUMMARY] form validator and matches-regex problem

Posted by Barbara Post <ba...@ifrance.com>.
I use :

^([\d\w][\d\w\-_\.]*@[\d\w\-_]+\.[\w]+[\.\w]*$ which works too.

When do I have to use square brackets and when do I use round ones
(parenthesis) ? Thanks.

Babs
----- Original Message -----
From: "Ivan Luzyanin" <iv...@ProZa.Lviv.UA>
To: <co...@xml.apache.org>
Sent: Friday, September 13, 2002 11:46 AM
Subject: Re: [SUMMARY] form validator and matches-regex problem


Hi!

Try matches-regex="^[\d\w][\d\w\-_\.]*@([\d\w\-_]+\.)+(\w){2,4}$"/>

Best regards!
Ivan.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [SUMMARY] form validator and matches-regex problem

Posted by Ivan Luzyanin <iv...@ProZa.Lviv.UA>.
Hi!

Try matches-regex="^[\d\w][\d\w\-_\.]*@([\d\w\-_]+\.)+(\w){2,4}$"/>

Best regards!
Ivan.


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: [SUMMARY] form validator and matches-regex problem

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
This does not work with:

email@one.two.com

Antonio Gallardo

El Viernes, 13 de Septiembre de 2002 02:09, Antonio Gallardo Rivera escribió:
> PLease, to be clear, then the email validator can be:
>
> matches-regex="^[\d\w][\d\w\-_\.]*@([\d\w\-_]+\.)\w\w\w?\w?$"/>
>                                                                          
> ^^^ This will check for example: .com .ni and .info?
>
> Its that right?
>
> Antonio Gallardo
>
> > Er, watch out: there are TDLs that have 2 characters (the
> > country codes) and others that have 4 (.info).
>
> El Viernes, 30 de Agosto de 2002 14:17, Barbara Post escribió:
> > Thanks Andre, you're right. :-)

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>