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

# Validate Rules

> Check your rules for syntax errors and issues before deploying

Check your rules for syntax errors, invalid references, and performance issues before deploying.

```bash theme={null}
# Validate all rules (default + custom directories) - default behavior
./blocklight validate

# Validate rules in a specific directory
./blocklight validate --rules rules/custom/

# Validate a single rule file
./blocklight validate --rule rules/custom/my_rule.yaml
```

## What's Validated

* YAML syntax correctness
* Required fields present
* Valid operators and field names
* List and macro references exist
* Output template syntax
* Regex patterns (if used)
* Performance warnings

<Tip>
  Always validate before deploying. Add this to your CI/CD pipeline.
</Tip>
