RegularExpression code for server-side validation of Date

Discussion in 'ASP .Net' started by =?Utf-8?B?bWc=?=, May 19, 2004.

  1. Does someone have RegularExpression code (C# WebForm) for server-side validation of Date (mm/dd/yyyy) ... including leap year?
     
    =?Utf-8?B?bWc=?=, May 19, 2004
    #1
    1. Advertising

  2. One more question: How can I perform server-side validation on a string for U.S. currency

    xxx,xxx or xxx,xxx.xx or xxxxxxx [any number of x's] pass. Other strings do not.
     
    =?Utf-8?B?bWc=?=, May 19, 2004
    #2
    1. Advertising

  3. The following web site sahould be helpful to you for this and future similar
    problems:

    http://www.regexplib.com/

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "mg" <> wrote in message
    news:...
    > One more question: How can I perform server-side validation on a string

    for U.S. currency?
    >
    > xxx,xxx or xxx,xxx.xx or xxxxxxx [any number of x's] pass. Other strings

    do not.
     
    Kevin Spencer, May 19, 2004
    #3
  4. =?Utf-8?B?bWc=?=

    Peter Blum Guest

    The CompareValidator will handle validating dates, integers, currencies and
    decimal. Just set its Operator property to "DataTypeCheck" and the Type
    property to the desired type. This system is more functional than using
    regexs (as well as easier) in that it respects the culture of the page. For
    dates, it also knows if a date is not legal.

    --- Peter Blum
    www.PeterBlum.com
    Email:
    Creator of "Professional Validation And More" at
    http://www.peterblum.com/vam/home.aspx

    "mg" <> wrote in message
    news:...
    > Does someone have RegularExpression code (C# WebForm) for server-side

    validation of Date (mm/dd/yyyy) ... including leap year?
     
    Peter Blum, May 20, 2004
    #4
    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. Matt
    Replies:
    14
    Views:
    4,176
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  2. =?Utf-8?B?dmlkeWE=?=
    Replies:
    1
    Views:
    771
    Kevin Spencer
    Jun 2, 2005
  3. Phillip Vong

    RegularExpression for validation

    Phillip Vong, Aug 29, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    388
    Phillip Vong
    Aug 29, 2006
  4. Replies:
    5
    Views:
    635
  5. bienwell
    Replies:
    5
    Views:
    21,694
Loading...

Share This Page