You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Chris Newland <ch...@emorphia.com> on 2001/08/29 15:12:59 UTC
patch for xdocs/logicsheet-forms.xml
Hi All,
A very low priority patch for the xdocs.
I've updated the valid email regular expression example to allow emails that
don't end in a dot followed by 3 letters.
This now allows domains such as .co.uk :)
I'm not a regexpert so I'd recommend a sanity check on this one.
Best Regards,
Chris
Index: logicsheet-forms.xml
===================================================================
RCS file: /home/cvspublic/xml-cocoon2/xdocs/logicsheet-forms.xml,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 logicsheet-forms.xml
--- logicsheet-forms.xml 2001/07/28 22:01:58 1.1.2.7
+++ logicsheet-forms.xml 2001/08/29 13:09:41
@@ -43,8 +43,7 @@
<parameter name="persons" type="long" min="1" default="4" nullable="no"/>
<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?$">
+ <parameter name="email" type="string" max-len="50"
matches-regex="^([a-z0-9_]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,4}$"/>
<constraint-set name="car-reservation">
<validate name="persons"/>
--
Chris Newland
Software Research Engineer
Emorphia Ltd
Registered in England. 4133002
Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
Email: chris.newland@emorphia.com
Tel: +44 (0)1279 450100
Fax: +44 (0)1279 450102
Check out FIPA-OS at http://fipa-os.sourceforge.net/
This message may contain information proprietary to Emorphia so any
unauthorised disclosure, copying or distribution of its contents is strictly
prohibited.
Re: patch for xdocs/logicsheet-forms.xml
Posted by Davanum Srinivas <di...@yahoo.com>.
Team,
Can someone check the reg-exp? I need a second opinion as am not a regexpert either. If someone
validates this, i can check it in.
Thanks,
dims
--- Chris Newland <ch...@emorphia.com> wrote:
> Hi All,
>
> A very low priority patch for the xdocs.
>
> I've updated the valid email regular expression example to allow emails that
> don't end in a dot followed by 3 letters.
>
> This now allows domains such as .co.uk :)
>
> I'm not a regexpert so I'd recommend a sanity check on this one.
>
> Best Regards,
>
> Chris
>
> Index: logicsheet-forms.xml
> ===================================================================
> RCS file: /home/cvspublic/xml-cocoon2/xdocs/logicsheet-forms.xml,v
> retrieving revision 1.1.2.7
> diff -u -r1.1.2.7 logicsheet-forms.xml
> --- logicsheet-forms.xml 2001/07/28 22:01:58 1.1.2.7
> +++ logicsheet-forms.xml 2001/08/29 13:09:41
> @@ -43,8 +43,7 @@
>
> <parameter name="persons" type="long" min="1" default="4" nullable="no"/>
> <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?$">
> + <parameter name="email" type="string" max-len="50"
> matches-regex="^([a-z0-9_]|\-|\.)+@(([a-z0-9_]|\-)+\.)+[a-z]{2,4}$"/>
>
> <constraint-set name="car-reservation">
> <validate name="persons"/>
>
>
>
> --
> Chris Newland
> Software Research Engineer
>
> Emorphia Ltd
> Registered in England. 4133002
> Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK
>
> Email: chris.newland@emorphia.com
> Tel: +44 (0)1279 450100
> Fax: +44 (0)1279 450102
>
> Check out FIPA-OS at http://fipa-os.sourceforge.net/
>
> This message may contain information proprietary to Emorphia so any
> unauthorised disclosure, copying or distribution of its contents is strictly
> prohibited.
>
> ATTACHMENT part 2 application/octet-stream name=logicsheet-forms.xml.patch
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org