diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-05-10 12:28:00 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-05-10 12:28:00 +0000 |
| commit | 34587d8a2a5fd6cfd5fbe70b4b328a65d2407e0d (patch) | |
| tree | ef62945047439e72494705d8af606e3aaf626863 /django | |
| parent | b82a5b9dd0041f81e3527eea1f254f381ad9ba1a (diff) | |
Fixed #13341 -- Clarified default arguments to the RegexValidator. Thanks to David Fischer for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/validators.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/django/core/validators.py b/django/core/validators.py index b1b82dbf0d..bcf7789c25 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -21,16 +21,22 @@ class RegexValidator(object): code = 'invalid' def __init__(self, regex=None, message=None, code=None): + print 'test' if regex is not None: + print 1 self.regex = regex if message is not None: + print 2 self.message = message if code is not None: + print 3 self.code = code + print 4 if isinstance(self.regex, basestring): + print 5 self.regex = re.compile(regex) - + print 'REGEX', type(self.regex), self.regex def __call__(self, value): """ Validates that the input matches the regular expression. |
