On 02.Jul.2001 -- 05:31 PM, java guru wrote:
> The problem with regular expression in that example is
> that:
> 
> for email address i just put anything and it
> works..shouldnt it be of format [EMAIL PROTECTED] ???

Yes, indeed. Unfortunately, I'm not able to reproduce your
observation. I remember that the first draft of examples had a couple
of syntax errors in them, maybe that's it. "Bug" 2415 contains up to
date examples.

Please try the following descriptor.xml file

<?xml version="1.0"?>
<root>

   <parameter name="persons" type="long" min="2" default="9" max="99" nullable="yes"/>
   <parameter name="deposit" type="double" min="10.0" max="999.99"/>
   <parameter name="email" type="string" max-len="50" 
matches-regex="^[\d\w][\d\w\-_\.]*@([\d\w\-_]+\.)\w\w\w?$"/>

   <constraint-set name="car-reservation">
       <validate name="persons"/>
       <validate name="deposit" min="50.0"/>
       <validate name="email"/>
    </constraint-set>

</root>

I hope that the new versions will show up in CVS really soon.

        Chris.

-- 
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to