def METHOD_NAME(self, keys, filterset_class):
    """
    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.
    """
    for k in keys:
        if (not filterset_class) or (k not in filterset_class.base_filters):
            raise ValidationError(f"invalid filter[{k}]")