core.validators.DecimalValidator

class DecimalValidator(max_digits, decimal_places) [source]

New in Django 1.9.

Raises ValidationError with the following codes:

  • 'max_digits' if the number of digits is larger than max_digits.
  • 'max_decimal_places' if the number of decimals is larger than decimal_places.
  • 'max_whole_digits' if the number of whole digits is larger than the difference between max_digits and decimal_places.
doc_Django
2016-10-09 18:35:00
Comments
Leave a Comment

Please login to continue.