-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
area: formsfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under considerationfreq2: mediumworkaround2: non-obvious
Milestone
Description
I find observables really powerful. In the context of HTTP, it's a killer feature since we can use the debounceTime and switchMap operators to control the sent requests and cancel them if necessary.
When using asynchronous validators, it seems that we don't have access to this feature since the call of the validator is internally done and we can't configure the way it's triggered.
I would like to implement something similar than the following within asynchronous validation:
this.ctrl.valueChanges.debounceTime(500).switchMap((val) => {
return this.http.get('https://...');
}).subscribe((data) => {
// here would be the validation
});
Is it something supported (or that will be) at the form validation level?
Thanks very much by advance,
Thierry
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: formsfeatureIssue that requests a new featureIssue that requests a new featurefeature: under considerationFeature request for which voting has completed and the request is now under considerationFeature request for which voting has completed and the request is now under considerationfreq2: mediumworkaround2: non-obvious