Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
Angular has a new websiteHead to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

AsyncValidatorFn

A function that receives a control and returns a Promise or observable that emits validation errors if present, otherwise null.

      
      interface AsyncValidatorFn {
(control: AbstractControl<any, any>): Promise<ValidationErrors | null> | Observable<ValidationErrors | null> }

Methods

      
      (control: AbstractControl<any, any>): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>
    
Parameters
control AbstractControl<any, any>
Returns

Promise<ValidationErrors | null> | Observable<ValidationErrors | null>