New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormControl setValidators / setAsyncValidators API inconsistency #20296

Closed
jindrichruzicka opened this Issue Nov 9, 2017 · 0 comments

Comments

Projects
None yet
3 participants
@jindrichruzicka

jindrichruzicka commented Nov 9, 2017

Due to https://angular.io/api/forms/FormControl

there are these two methods:
setValidators(newValidator: ValidatorFn|ValidatorFn[]|null): void
setAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]): void

first can take null as a parameter and the second can't. This is weird, I guess this should be made consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment