cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Mata <manuel_mata_ru...@yahoo.es>
Subject Re: Multiple regular expresion validation
Date Tue, 27 Feb 2007 17:26:55 GMT
Yeah it works. I should read some about RE ...

<fd:regexp pattern="\d{9}|\d{3} \d{3} \d{3}|\d{3}
\d{2} \d{2} \d{2}">

But i cant use the xi:include. It should be a nice
feature to define widgets individually and use in
forms referencing them.

See ya.

--- Gajo Csaba <csaba@enyem.com> escribió:

> Manual, can't you just change your first regular
> expression to something  
> like this?
> 
> ([0-9](9))|([0-9](3) [0-9](3) [0-9](3))|([0-9](3)
> [0-9](2) [0-9](2))
> 
> Csaba
> 
> 
> On Tue, 27 Feb 2007 17:52:06 +0100, Manuel Mata  
> <manuel_mata_rueda@yahoo.es> wrote:
> 
> > Hi all. I have this widget definition and a surely
> > with easy solution problem, but i dont know how.
> >
> > <fd:field id="phone" required="true">
> >  <fd:label><i18n:text
> key="label.phone"/>:</fd:label>
> >  <fd:datatype base="string"/>
> >  <fd:validation>
> >   <fd:length max="12"/>
> >   <fd:regexp pattern="[0-9](9)"/>
> >   <fd:regexp pattern="[0-9](3) [0-9](3)
> [0-9](3)"/>
> >   <fd:regexp pattern="[0-9](3) [0-9](2) [0-9](2)
> > [0-9](2)"/>
> >  </fd:validation>
> > </fd:field>
> >
> > What i need is to accept phone numbers like:
> >
> > XXXXXXXXX
> > XXX XXX XXX
> > XXX XX XX XX
> >
> > but the form only validates the first one. How can
> i
> > do that accept anyone of the three ?.
> >
> > Another question. Is it possible to define this
> widget
> > in any file like "phone.widget.xml" and reuse it
> in
> > forms with a strategy like xi:include ?
> >
> > Thx for your time.
> >
> >
> > 		
> > ______________________________________________
> > LLama Gratis a cualquier PC del Mundo.
> > Llamadas a fijos y móviles desde 1 céntimo por
> minuto.
> > http://es.voice.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail:
> users-help@cocoon.apache.org
> >
> >
> >
> 
> 
> 
> -- 
> Using Opera's revolutionary e-mail client:
> http://www.opera.com/mail/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail:
> users-help@cocoon.apache.org
> 
> 



		
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message