MCPcopy Create free account
hub / github.com/angular/angular / _assignAsyncValidators

Function _assignAsyncValidators

packages/forms/src/model/abstract_model.ts:1824–1827  ·  view source on GitHub ↗

* Internal implementation of the `setAsyncValidators` method. Needs to be separated out into a * different method, because it is called in the constructor and it can break cases where * a control is extended.

(validators: AsyncValidatorFn | AsyncValidatorFn[] | null)

Source from the content-addressed store, hash-verified

1822 * a control is extended.
1823 */
1824 private _assignAsyncValidators(validators: AsyncValidatorFn | AsyncValidatorFn[] | null): void {
1825 this._rawAsyncValidators = Array.isArray(validators) ? validators.slice() : validators;
1826 this._composedAsyncValidatorFn = coerceToAsyncValidator(this._rawAsyncValidators);
1827 }
1828
1829 private _updateHasRequiredValidator(): void {
1830 untracked(() => this._hasRequired.set(this.hasValidator(Validators.required)));

Callers

nothing calls this directly

Calls 3

coerceToAsyncValidatorFunction · 0.85
isArrayMethod · 0.80
sliceMethod · 0.65

Tested by

no test coverage detected