[thelist] validation expression help
Joe Ngo
chilijoe at gmail.com
Wed Dec 29 20:12:13 CST 2004
to allow 1 or 2:
"\d{1,2}/\d{1,2}/\d{4}"
to further limit the month to (0)1 - 12, and days to 1 - 31:
"(0+[1-9]|1[12])/(0+[1-9]|[12]\d|3[01])/\d{4}"
On Wed, 29 Dec 2004 18:51:08 -0600, Casey Crookston
<casey at thecrookstons.com> wrote:
> I need to use a Validation Expression to make sure a date is entered
> correctly.
>
> ValidationExpression="\d{2}/\d{2}/\d{4}"
>
> That works unless the date is something like 1/1/2004.
>
> ValidationExpression="\d{1}/\d{1}/\d{4}"
>
> That works unless the date is something like 10/10/2004.
>
> How do you build an option into the expression to allow 1 or 2 numbers?
>
> Thanks, Casey
>
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
--
Take back the web!
http://www.spreadfirefox.com
More information about the thelist
mailing list