              self.validators.append(MinValueValidator(min_value, message=message))
  
      def to_internal_value(self, value):
          try:
              return float(value)
          except (TypeError, ValueError):
              self.fail('invalid')
  
      def to_representation(self, value):
          return float(value)
 
</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             data = int(six.text_type(data))
 </s> add             data = int(data) </s> remove     def to_internal_value(self, value):
 </s> add     def to_internal_value(self, data):
            return float(data)
              self.validators.append(MinValueValidator(min_value, message=message))
  
      def to_internal_value(self, value):
          try:
            return float(data)
          except (TypeError, ValueError):
              self.fail('invalid')
  
      def to_representation(self, value):
          return float(value)
keep keep keep keep replace keep keep keep keep keep
 Guard against malicious string inputs for numbers. Closes #1903. 
rest_framework/fields.py