UNPKG

ngx-mat-errors

Version:

NgxMatErrors provides an easy, yet flexible solution for displaying error messages in a MatFormField.

9 lines (8 loc) 453 B
import type { AbstractControl } from '@angular/forms'; import type { INgxMatErrorDef } from '../ngx-mat-error-def.directive'; import { ErrorMessages } from '../types'; /** * Finds the error key or custom error for a control. * @returns INgxMatErrorDef | undefined */ export declare function findErrorForControl(control: AbstractControl, messages: ErrorMessages, customErrorMessages: readonly INgxMatErrorDef[]): string | INgxMatErrorDef | undefined;