W3cubDocs

/Angular

ValidatorFn

A function that receives a control and synchronously returns a map of validation errors if present, otherwise null.

API

interface ValidatorFn {
  (control: AbstractControl<any, any, any>): ValidationErrors | null;
}
ValidationErrors | null
@paramcontrolAbstractControl<any, any, any>
@returnsValidationErrors | null

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/forms/ValidatorFn