Validation Message for Angular
Introduction
Section titled “Introduction”A standalone field message (error, warning, success, or info) for controls that AbsoluteUI does not render itself. It adds its id to the target’s aria-describedby and, for errors, sets aria-invalid on the target. AbsoluteUI inputs render the same aui-validation-message markup internally.
- Four tonesError, warning, success, and info messages, each with its own icon.
- Linked to the controlAdds itself to the control's description and marks the control invalid for errors.
- Consistent lookUses the same markup as the messages built into AbsoluteUI inputs.
- Safe textMessages are set as text and never parsed as HTML.
Behavior, design tokens, and limitations are described on the Validation Message page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component } from '@angular/core';import { AuiValidationMessage } from '@absoluteui/angular/validation-message';import { AuiFormField } from '@absoluteui/angular/form-field';
@Component({ selector: 'app-promo', imports: [AuiValidationMessage, AuiFormField], template: ` <aui-form-field label="Promo code"><input #promo name="promo" /></aui-form-field> <aui-validation-message [for]="promo" [message]="message" tone="error"></aui-validation-message>`,})export class PromoComponent { message = '';}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiValidationMessage } from '@absoluteui/angular/validation-message';Defaults for every instance: provideAbsoluteUIConfig({ components: { validationMessage: { ... } } }) (see Configuration).
API reference
Section titled “API reference”<aui-validation-message>
Section titled “<aui-validation-message>”Class AuiValidationMessage; template reference #ref="auiValidationMessage".
Server rendering: Renders on the server; the browser re-creates it after hydration.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
message |
string |
'' |
Message text. Empty hides the message and unlinks the target. |
tone |
ValidationMessageTone |
'error' |
Visual tone and icon. Only ‘error’ sets aria-invalid on the target. |
for |
HTMLElement | null |
Control described by the message: receives the host id in aria-describedby while a message is shown, and aria-invalid for errors. | |
icons |
Partial<ValidationMessageIcons> |
Icon overrides per tone. |
Methods
Section titled “Methods”Call them through a viewChild query or a template reference.
| Method | Description |
|---|---|
setMessage(message: string, tone?: ValidationMessageTone | undefined): void |
Set the message and optionally the tone. |
clear(): void |
Hide the message and unlink the target. |
Accessibility and performance
Section titled “Accessibility and performance”Pattern: Field description referenced by aria-describedby, with aria-invalid on the target for errors (HTML/ARIA).
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Validation Message: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.