UNPKG

@ngspot/ngx-errors

Version:

<p align="center"> <img width="20%" height="20%" src="https://github.com/DmitryEfimenko/ngspot/blob/main/packages/ngx-errors/package/assets/logo.png?raw=true"> </p>

15 lines (14 loc) 655 B
import { InjectionToken } from '@angular/core'; import { AbstractControl, FormGroupDirective, NgForm } from '@angular/forms'; export interface IErrorStateMatcher { isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean; } export type CustomErrorStateMatchers = { [key: string]: IErrorStateMatcher; }; /** * Provides a way to add to available options for when to display an error for * an invalid control. Options that come by default are * `'touched'`, `'dirty'`, `'touchedAndDirty'`, `'formIsSubmitted'`. */ export declare const CUSTOM_ERROR_STATE_MATCHERS: InjectionToken<CustomErrorStateMatchers>;