Permalink
Browse files

feat(forms): allow nulls on setAsyncValidators (#20327)

closes #20296

PR Close #20327
  • Loading branch information...
Toxicable authored and jasonaden committed Nov 10, 2017
1 parent 4efc32d commit d41d2c460a48e2cd866f2874e611fca266e606a0
Showing with 2 additions and 2 deletions.
  1. +1 −1 packages/forms/src/model.ts
  2. +1 −1 tools/public_api_guard/forms/forms.d.ts
@@ -253,7 +253,7 @@ export abstract class AbstractControl {
* Sets the async validators that are active on this control. Calling this
* will overwrite any existing async validators.
*/
setAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]): void {
setAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]|null): void {
this.asyncValidator = coerceToAsyncValidator(newValidator);
}
@@ -50,7 +50,7 @@ export declare abstract class AbstractControl {
}): void;
abstract patchValue(value: any, options?: Object): void;
abstract reset(value?: any, options?: Object): void;
setAsyncValidators(newValidator: AsyncValidatorFn | AsyncValidatorFn[]): void;
setAsyncValidators(newValidator: AsyncValidatorFn | AsyncValidatorFn[] | null): void;
setErrors(errors: ValidationErrors | null, opts?: {
emitEvent?: boolean;
}): void;

0 comments on commit d41d2c4

Please sign in to comment.