Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Validate date via Regular Expression
- From: javascript@xxxxxxxxxx (javascript@xxxxxxxxxx)
- Subject: [Javascript] Validate date via Regular Expression
- Date: Fri, 13 Sep 2002 15:12:53 +0200
Hi,
What is wrong with this regular expression:
var re=/\b((19|20)\d{2})[\-](1[0-2]|0?[1-9])[\-](0?[1-9]|[12][0-9]|3[01])/
I'm trying to check if date is correct.Date format should by YYYY-MM-DD but when
I validate somethig like this: 2002-12-54 the test expression doesn't see any
error ?
- Prev by Date: [Javascript] RE: RE: Invoke onclick event of one button from clicking a second button
- Next by Date: [Javascript] Disable View Source...
- Previous by thread: [Javascript] RE: RE: Invoke onclick event of one button from clicking a second button
- Next by thread: [Javascript] JavaScript syntax problem?
- Index(es):