| 90 | * @publicApi |
| 91 | */ |
| 92 | export interface Validator { |
| 93 | /** |
| 94 | * @description |
| 95 | * Method that performs synchronous validation against the provided control. |
| 96 | * |
| 97 | * @param control The control to validate against. |
| 98 | * |
| 99 | * @returns A map of validation errors if validation fails, |
| 100 | * otherwise null. |
| 101 | */ |
| 102 | validate(control: AbstractControl): ValidationErrors | null; |
| 103 | |
| 104 | /** |
| 105 | * @description |
| 106 | * Registers a callback function to call when the validator inputs change. |
| 107 | * |
| 108 | * @param fn The callback function |
| 109 | */ |
| 110 | registerOnValidatorChange?(fn: () => void): void; |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * A base class for Validator-based Directives. The class contains common logic shared across such |
no outgoing calls
no test coverage detected