code: def _validate_filter(self, keys, filterset_class):
          
          for k in keys:
              if ((not filterset_class) or (k not in filterset_class.base_filters)):
                  raise ValidationError("invalid filter[{}]".format(k))
docs: Check that all the filter[key] are valid.
  
          :param keys: list of FilterSet keys
          :param filterset_class: :py:class:`django_filters.rest_framework.FilterSet`
          :raises ValidationError: if key not in FilterSet keys or no FilterSet.