Regular Expression Date Validation

Discussion in 'ASP .Net Web Controls' started by Ken, Jun 27, 2003.

  1. Ken

    Ken Guest

    What is the regular expression for a date format of mm/dd/yy? This is the
    closest I have come

    ValidationExpression = "\d{1,2}\/\d{1,2}\/\d{2}"

    The problem is that it is allowing any two digit month, day and year. Should
    I use both the regular expression and the CustomValidator controls with
    script for the date validation?

    Thank you,
    Ken
    Ken, Jun 27, 2003
    #1
    1. Advertising

  2. Ken

    Kenny Guest

    build a calendar control to make your life easier, somemore it is more user
    friendly

    "Ken" <> wrote in message
    news:%23$...
    > What is the regular expression for a date format of mm/dd/yy? This is the
    > closest I have come
    >
    > ValidationExpression = "\d{1,2}\/\d{1,2}\/\d{2}"
    >
    > The problem is that it is allowing any two digit month, day and year.

    Should
    > I use both the regular expression and the CustomValidator controls with
    > script for the date validation?
    >
    > Thank you,
    > Ken
    >
    >
    >
    Kenny, Jun 27, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VSK
    Replies:
    2
    Views:
    2,272
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,229
    Michael Borgwardt
    May 30, 2004
  3. =?iso-8859-1?B?bW9vcJk=?=

    Matching abitrary expression in a regular expression

    =?iso-8859-1?B?bW9vcJk=?=, Dec 1, 2005, in forum: Java
    Replies:
    8
    Views:
    831
    Alan Moore
    Dec 2, 2005
  4. GIMME
    Replies:
    3
    Views:
    11,923
    vforvikash
    Dec 29, 2008
  5. Paul Keister

    Regular Expression Date Validation

    Paul Keister, Oct 7, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    272
    Paul Keister
    Oct 7, 2003
Loading...

Share This Page