protected static function validateCriteria(array $data, array $fields): array
    {
        foreach (array_keys($data) as $key) {
            if (in_array($key, $fields)) {
                continue;
            }
            unset($data[$key]);
        }

        return $data;
    }