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): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>
}
    

方法

(control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>
      
      (control: AbstractControl): Promise<ValidationErrors | null> | Observable<ValidationErrors | null>
    
参数
control AbstractControl
返回值

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