Changeset 3142
- Timestamp:
- 06/18/06 20:09:00 (2 years ago)
- Files:
-
- django/trunk/django/core/validators.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/validators.py
r3113 r3142 356 356 raise ValidationError, ngettext("Please enter a valid decimal number with at most %s total digit.", 357 357 "Please enter a valid decimal number with at most %s total digits.", self.max_digits) % self.max_digits 358 if (not '.' in data and len(data) > (self.max_digits - self.decimal_places)) or ('.' in data and len(data) > (self.max_digits - (self.decimal_places - len(data.split('.')[1])) + 1)): 359 raise ValidationError, ngettext( "Please enter a valid decimal number with a whole part of at most %s digit.", 360 "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) 358 361 if '.' in data and len(data.split('.')[1]) > self.decimal_places: 359 362 raise ValidationError, ngettext("Please enter a valid decimal number with at most %s decimal place.",
