summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-01-27 16:05:00 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-01-27 16:05:00 +0000
commite15567bf58aa3331099eaefad6464aa38fdf6f20 (patch)
treefd5c7a53a0038286fd19c01e1184a3105326006e
parent1dc65cb6ab158fae3ccae55512a4f49ec3654758 (diff)
Fixed #1070 -- Improved date validation to limit it to dates 1900 and up.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/validators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/validators.py b/django/core/validators.py
index a319a1c23a..a4e33637bc 100644
--- a/django/core/validators.py
+++ b/django/core/validators.py
@@ -10,7 +10,7 @@ form field is required.
import re
-_datere = r'\d{4}-((?:0?[1-9])|(?:1[0-2]))-((?:0?[1-9])|(?:[12][0-9])|(?:3[0-1]))'
+_datere = r'(19|2\d)\d{2}-((?:0?[1-9])|(?:1[0-2]))-((?:0?[1-9])|(?:[12][0-9])|(?:3[0-1]))'
_timere = r'(?:[01]?[0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?'
alnum_re = re.compile(r'^\w+$')
alnumurl_re = re.compile(r'^[\w/]+$')