preventing 00/00/00 as date

Results 1 to 3 of 3

Thread: preventing 00/00/00 as date

  1. #1
    Kentium Guest

    Default preventing 00/00/00 as date

    I&#039;ve got users who are entering 00/00/00 as a date, and I want to prevent this...<BR><BR>I&#039;ve never written a RegEx before, so i&#039;m not sure exactly the syntax for matching similar numbers in the same string.<BR><BR>Can anyone give me some clues or help?<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default Why use a RegExp?

    Yeah, they&#039;re powerful and all, but why not just use Instr() to look for "00/" in the date? That&#039;ll catch any days or months that contain "00", but allow the year 2000 to be short-abbreviated in. Or, if you don&#039;t want "00"s entered anywhere, just look for "00".

  3. #3
    Join Date
    Dec 1969

    Default Agreed

    What does isDate() return? It can&#039;t be valid, surely.<BR><BR>A regular expression definately isn&#039;t needed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts