public function sanitize(array $rules, array $data): array
    {
        [$data, $rules] = $this->runGlobalSanitizers($rules, $data);

        $availableRules = \array_intersect_key($rules, \array_flip(array_keys($data)));

        foreach ($availableRules as $field => $ruleset) {
            $data[$field] = $this->sanitizeField($data, $field, $ruleset);
        }

        return $data;
    }