

Every state


default


focus


error


valid


server-error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "booking-reference" | Input id; the message line hangs off it. |
| name | string | "bookingReference" | Form field name. |
| label | string | "Booking reference" | Visible label. |
| example | string | "AB-123456" | The format example. |
| hintLabel | string | – | Text before the example in the hint. |
| validate | (value: string) => string | undefined | – | Returns the error for a value, or nothing. Runs when the field is left, then on every change. An error ending in "like" gets the example after it. |
| validLabel | string | "Looks right" | Shown once the value is right. |
| placeholder | string | – | Placeholder inside the field. |
| defaultValue | string | – | Starting value. |
| required | boolean | true | Marks the field required. |
| disabled | boolean | – | Disables the field. |
| error | string | – | An error from the server, shown in place of the hint until the value changes. |
| className | string | – | Extra classes on the outer Field. |
More form messages
All 7form-message-02 is in UI ProGet UI Pro, €199


