+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "regexValidation"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
+++
## regexValidation variable
### regexValidation variable
Signature
```typescript
regexValidation: (pattern: string | RegExp, errorMessage?: string | undefined) => ValidationRule
```
Import
```typescript
import { regexValidation } from '@grafana/ui';
```