summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-09-22 13:33:43 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2006-09-22 13:33:43 +0000
commitaa30761d518281adbb215a2bd76357e3653a72e6 (patch)
tree1a63fe9ac2c158c9b3993b3014ce2c0ddd3d1bcc
parentd8b84cac9170d26b8a7033c2c7ff7a6620ac81b6 (diff)
Fixed #2789 -- Corrected typo from r3788.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3796 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 03590a456b..705425ea18 100644
--- a/django/core/validators.py
+++ b/django/core/validators.py
@@ -356,7 +356,7 @@ class IsValidFloat(object):
if len(data) > max_allowed_length:
raise ValidationError, ngettext("Please enter a valid decimal number with at most %s total digit.",
"Please enter a valid decimal number with at most %s total digits.", self.max_digits) % self.max_digits
- if (not '.' in data and len(data) > (self.max_allowed_length - self.decimal_places)) or ('.' in data and len(data) > (self.max_digits - (self.decimal_places - len(data.split('.')[1])) + 1)):
+ if (not '.' in data and len(data) > (max_allowed_length - self.decimal_places)) or ('.' in data and len(data) > (self.max_digits - (self.decimal_places - len(data.split('.')[1])) + 1)):
raise ValidationError, ngettext( "Please enter a valid decimal number with a whole part of at most %s digit.",
"Please enter a valid decimal number with a whole part of at most %s digits.", str(self.max_digits-self.decimal_places)) % str(self.max_digits-self.decimal_places)
if '.' in data and len(data.split('.')[1]) > self.decimal_places: