+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "ValidationRule"
keywords = ["grafana","documentation","sdk","@grafana/ui"]
type = "docs"
draft = true
+++

## ValidationRule interface

<b>Signature</b>

```typescript
export interface ValidationRule 
```
<b>Import</b>

```typescript
import { ValidationRule } from '@grafana/ui';
```
<b>Properties</b>

|  Property | Type | Description |
|  --- | --- | --- |
|  [errorMessage](#errormessage-property) | <code>string</code> |  |
|  [rule](#rule-property) | <code>(valueToValidate: string) =&gt; boolean</code> |  |

### errorMessage property

<b>Signature</b>

```typescript
errorMessage: string;
```

### rule property

<b>Signature</b>

```typescript
rule: (valueToValidate: string) => boolean;
```
