Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow / index / ErrorMessage

Function: ErrorMessage()

ErrorMessage(props): HtmlNode

Defined in: flow/src/components.ts:508

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

Returns

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

<ErrorMessage for={this.email} />