W3cubDocs

/Angular 12

AsyncValidatorFn

interface

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

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

Methods

(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>

Parameters
control AbstractControl
Returns

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

© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/forms/AsyncValidatorFn