Angular-ReactiveForms icon indicating copy to clipboard operation
Angular-ReactiveForms copied to clipboard

Generic validator with AsyncValidator

Open FolabiAhn opened this issue 3 years ago • 0 comments

I'm just opening a little discussion on this subject.

I wonder if this part of the code will work with AsyncValidators ? merge(this.productForm.valueChanges, ...controlBlurs).pipe( debounceTime(800) ).subscribe(value => { this.displayMessage = this.genericValidator.processMessages(this.productForm); });

My guess is this.genericValidator.processMessages(this.productForm) will end before AsyncValidators and so async errors won't be displayed. Maybe the errors will be displayed the next time this.genericValidator.processMessages(this.productForm) run again.

FolabiAhn avatar Nov 20 '21 21:11 FolabiAhn