mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
44 lines
965 B
Markdown
44 lines
965 B
Markdown
|
+++
|
||
|
# -----------------------------------------------------------------------
|
||
|
# Do not edit this file. It is automatically generated by API Documenter.
|
||
|
# -----------------------------------------------------------------------
|
||
|
title = "ValidationRule"
|
||
|
keywords = ["grafana","documentation","sdk","@grafana/ui"]
|
||
|
type = "docs"
|
||
|
+++
|
||
|
|
||
|
## 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) => boolean</code> | |
|
||
|
|
||
|
### errorMessage property
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
errorMessage: string;
|
||
|
```
|
||
|
|
||
|
### rule property
|
||
|
|
||
|
<b>Signature</b>
|
||
|
|
||
|
```typescript
|
||
|
rule: (valueToValidate: string) => boolean;
|
||
|
```
|