-
Notifications
You must be signed in to change notification settings - Fork 26.6k
Open
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 considerationstate: Needs Design
Milestone
Description
- I'm submitting a ...
- feature request
Current behavior
Validators are callback functions
Expected/desired behavior
Validators should be observables.
- What is the motivation / use case for changing the behavior?
Currently it is very counter intuitive to build debounced async validators (http://plnkr.co/edit/2NuNj1lBj2e6OdUJjFra?p=preview). It would be much cleaner to work with an observable chain that is subscribed once, instead of subscribed for every value change of a control.
It could look like this:
new Control('',validator$=>{
return validator$.map(valid=>{
valid.errors.minLen=valid.value.length>5?null,"Length must be at least 5";
return valid;
});
});
pkozlowski-opensource, datatypevoid, templth, trakhimenok, JohanDavidsson and 47 moretrakhimenok, Bretto, AionDev, fouadbhatti, robgha01 and 5 more
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 considerationstate: Needs Design