          super().__init__(**kwargs)
  
      def to_internal_value(self, data):
          with contextlib.suppress(TypeError):
              if data in self.TRUE_VALUES:
                  return True
              elif data in self.FALSE_VALUES:
                  return False
              elif data in self.NULL_VALUES and self.allow_null:
                  return None
 
</s> remove             elif data in self.FALSE_VALUES:
 </s> add             elif self._lower_if_str(data) in self.FALSE_VALUES: </s> remove             elif data in self.NULL_VALUES and self.allow_null:
 </s> add             elif self._lower_if_str(data) in self.NULL_VALUES and self.allow_null: </s> remove         self.fail('invalid', input=data)
 </s> add         self.fail("invalid", input=data) </s> remove         elif value in self.FALSE_VALUES:
 </s> add         elif self._lower_if_str(value) in self.FALSE_VALUES:
            if self._lower_if_str(data) in self.TRUE_VALUES:
          super().__init__(**kwargs)
  
      def to_internal_value(self, data):
          with contextlib.suppress(TypeError):
            if self._lower_if_str(data) in self.TRUE_VALUES:
                  return True
              elif data in self.FALSE_VALUES:
                  return False
              elif data in self.NULL_VALUES and self.allow_null:
                  return None
keep keep keep keep replace keep keep keep keep keep
 Permit mixed casing of string values for BooleanField validation (#8970)

* be more permissive of mixed casing in validating strings for BooleanField values

* undo unnecessary change

* lint 
rest_framework/fields.py