          'max_value': _('Ensure this value is less than or equal to {max_value}.'),
          'min_value': _('Ensure this value is greater than or equal to {min_value}.'),
          'max_digits': _('Ensure that there are no more than {max_digits} digits in total.'),
          'max_decimal_places': _('Ensure that there are no more than {max_decimal_places} decimal places.'),
          'max_whole_digits': _('Ensure that there are no more than {max_whole_digits} digits before the decimal point.')
      }
  
      coerce_to_string = api_settings.COERCE_DECIMAL_TO_STRING
  
      def __init__(self, max_digits, decimal_places, coerce_to_string=None, max_value=None, min_value=None, **kwargs):
 
</s> remove         value = smart_text(value).strip()
 </s> add         data = smart_text(data).strip()
        if len(data) > self.MAX_STRING_LENGTH:
            self.fail('max_string_length')
 </s> remove     def to_internal_value(self, value):
 </s> add     def to_internal_value(self, data):
        'max_whole_digits': _('Ensure that there are no more than {max_whole_digits} digits before the decimal point.'),
        'max_string_length': _('String value too large')
          'max_value': _('Ensure this value is less than or equal to {max_value}.'),
          'min_value': _('Ensure this value is greater than or equal to {min_value}.'),
          'max_digits': _('Ensure that there are no more than {max_digits} digits in total.'),
          'max_decimal_places': _('Ensure that there are no more than {max_decimal_places} decimal places.'),
        'max_whole_digits': _('Ensure that there are no more than {max_whole_digits} digits before the decimal point.'),
        'max_string_length': _('String value too large')
      }
  
      coerce_to_string = api_settings.COERCE_DECIMAL_TO_STRING
  
      def __init__(self, max_digits, decimal_places, coerce_to_string=None, max_value=None, min_value=None, **kwargs):
keep keep keep keep replace keep keep keep keep keep
 Guard against malicious string inputs for numbers. Closes #1903. 
rest_framework/fields.py