              return float(data)
          except (TypeError, ValueError):
              self.fail('invalid')
  
      def to_representation(self, value):
          return float(value)
  
  
 
</s> remove         'max_string_length': _('String value too large.')
 </s> add         'max_string_length': _('String value too large.'),
        'overflow': _('Integer value too large to convert to float')
        except OverflowError:
            self.fail('overflow')
              return float(data)
          except (TypeError, ValueError):
              self.fail('invalid')
        except OverflowError:
            self.fail('overflow')
  
      def to_representation(self, value):
          return float(value)
  
  
keep keep add keep keep keep keep keep
 FloatField will crash if the input is a number that is too big (#8725)

* FloatField will crash if the input is a number that is too big

* Added Unit test for float field overflow error catch

* Removed random import

* Removed additional imported ValidationError

* Update rest_framework/fields.py

* Update tests/test_fields.py

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com> 
rest_framework/fields.py