Validator
bk-validator: a small, reusable error-message renderer for template-driven forms. Point it at an NgModel (via a template reference) and gate it with showError.
Preview
A working preview of Validator in the Brickclay style. Try it.
Interact with the preview to see events here.
Required field
Email pattern
Focus a field, leave it empty (or invalid), then blur to see the message.
API reference
| Input | Type | Default | Description |
|---|---|---|---|
control | NgModel | required | The template-driven control to read validity from. |
label | string | required | Field label used in the message. |
errorMessage | string | '' | Message text shown when visible. |
showError | boolean | false | Caller decides when to show it (e.g. invalid && touched). |