import { ValidationErrors } from '@angular/forms'; /** * Builds the message for a validator error from its payload, e.g. * `({ requiredLength }) => \`Pick at least ${requiredLength} items\``. */ export type FieldErrorMessageResolver = (error: any, key: string) => string; /** Maps a validator error key to the message shown below a form field. */ export type FieldErrorMessages = Record; /** * Shipped messages every field starts with, each one overridable. Covers the * validators Angular ships, so a field says what is actually wrong with it * without every application having to spell out the same sentences again. */ export declare const DEFAULT_FIELD_ERROR_MESSAGES: FieldErrorMessages; /** * The message describing what a control is currently reporting: the consumer's * own message for that error, the shipped one, or `fallback` when the error has * no message mapped to it at all. Empty while the control is valid, which is * when a field shows its hint instead. */ export declare const resolveFieldErrorMessage: (errors: ValidationErrors | null | undefined, messages: FieldErrorMessages, defaults: FieldErrorMessages, fallback: string) => string;