          if min_value is not None:
              message = self.error_messages['min_value'].format(min_value=min_value)
              self.validators.append(MinValueValidator(min_value, message=message))
  
      def to_internal_value(self, value):
          """
          Validates that the input is a decimal number. Returns a Decimal
          instance. Returns None for empty values. Ensures that there are no more
          than max_digits in the number, and no more than decimal_places digits
          after the decimal point.
 
</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         'max_whole_digits': _('Ensure that there are no more than {max_whole_digits} digits before the decimal point.')
 </s> add         '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') </s> remove     def to_internal_value(self, value):
 </s> add     def to_internal_value(self, data):
        if isinstance(data, six.text_type) and len(data) > self.MAX_STRING_LENGTH:
            self.fail('max_string_length')
 </s> remove             value = decimal.Decimal(value)
 </s> add             value = decimal.Decimal(data) </s> remove             data = int(six.text_type(data))
 </s> add             data = int(data)
    def to_internal_value(self, data):
          if min_value is not None:
              message = self.error_messages['min_value'].format(min_value=min_value)
              self.validators.append(MinValueValidator(min_value, message=message))
  
    def to_internal_value(self, data):
          """
          Validates that the input is a decimal number. Returns a Decimal
          instance. Returns None for empty values. Ensures that there are no more
          than max_digits in the number, and no more than decimal_places digits
          after the decimal point.
keep keep keep keep replace keep keep keep keep keep
 Guard against malicious string inputs for numbers. Closes #1903. 
rest_framework/fields.py