> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Keys • Rust AI Agent SDK

> validate_keys: Validate that all keys in a set are valid

# validate\_keys

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**parse\_utils**](../modules/parse_utils) module.

Validate that all keys in a set are valid

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def validate_keys(
    provided: &HashSet<&'a str>,
    valid: &HashSet<&str>,
) -> Vec<&'a str>
```

## Parameters

<ParamField query="provided" type="&HashSet<&'a str>" required={true}>
  No description available.
</ParamField>

<ParamField query="valid" type="&HashSet<&str>" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Vec<&'a str>">
  The result of the operation.
</ResponseField>

## Uses

* `filter`
* `contains`
* `copied`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/parse_utils.rs#L275">
  `praisonai/src/parity/parse_utils.rs` at line 275
</Card>
