> ## 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.

# Phone Rule • Rust AI Agent SDK

> phone_rule: Create a rule to block phone numbers.

# phone\_rule

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

> This function is defined in the [**policy**](../modules/policy) module.

Create a rule to block phone numbers.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def phone_rule() -> PolicyRule
```

### Returns

<ResponseField name="Returns" type="PolicyRule">
  The result of the operation.
</ResponseField>

## Uses

* `description`
* `pattern`
* `action`
* `replacement`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/policy/mod.rs#L417">
  `praisonai/src/policy/mod.rs` at line 417
</Card>
