MCPcopy Index your code
hub / github.com/angular/angular / _assignValidators

Function _assignValidators

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

* Internal implementation of the `setValidators` 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: ValidatorFn | ValidatorFn[] | null)

Source from the content-addressed store, hash-verified

1788 * a control is extended.
1789 */
1790 private _assignValidators(validators: ValidatorFn | ValidatorFn[] | null): void {
1791 this._rawValidators = Array.isArray(validators) ? validators.slice() : validators;
1792 this._composedValidatorFn = coerceToValidator(this._rawValidators);
1793 this._updateHasRequiredValidator();
1794 }
1795
1796 /**
1797 * Internal implementation of the `setAsyncValidators` method. Needs to be separated out into a

Callers

nothing calls this directly

Calls 2

coerceToValidatorFunction · 0.85
isArrayMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…