@absoluteui/angular/forms
Angular forms support shared by every form control: control state, validation message mapping, and error keys.
import { AUI_FORM_ERRORS, provideAuiFormErrors } from '@absoluteui/angular/forms';Functions, constants, and types
Section titled “Functions, constants, and types”Functions
Section titled “Functions”provideAuiFormErrors
Messages for your own validators (or overrides of the defaults):
provideAuiFormErrors({ forbiddenName: 'This name is taken.', minlength: (e) => ... }).
function provideAuiFormErrors(messages: AuiFormErrorMessages): Provider;Constants
Section titled “Constants”AUI_FORM_ERRORS
const AUI_FORM_ERRORS: InjectionToken<Readonly<Record<string, string | ((error: unknown) => string)>>>;Interfaces
Section titled “Interfaces”AuiControlState
Angular form state of a control, as signals (all false without a form binding).
interface AuiControlState { readonly touched: Signal<boolean>; readonly dirty: Signal<boolean>; readonly pending: Signal<boolean>; readonly submitted: Signal<boolean>; readonly errorState: Signal<boolean>;}AuiFormErrorMessages
Message per validator error key: text, or a function of the error value.
type AuiFormErrorMessages = Readonly<Record<string, string | ((error: unknown) => string)>>;