[**Documentation**](../../../../README)

***

[Documentation](../../../../README) / [@zerotal/flow](../../README) / [index](../README) / ErrorMessage

# Function: ErrorMessage()

> **ErrorMessage**(`props`): [`HtmlNode`](../type-aliases/HtmlNode)

Defined in: [flow/src/components.ts:508](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/flow/src/components.ts#L508)

A single field's first validation message as a reactive, self-hiding `<span>`
(hidden when the field has no error). Point it at a field with `for`.

## Parameters

### props

[`ErrorProps`](../interfaces/ErrorProps)

## Returns

[`HtmlNode`](../type-aliases/HtmlNode)

## Remarks

In a compiled page the Flow compiler rewrites this to a `<span flow:error flow:show>`;
`for={this.email}` (the bound property) resolves to that field's errors. The runtime
body here is the fallback and also accepts the `this.errors.<field>` accessor.

## Example

```tsx
<ErrorMessage for={this.email} />
```
