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

Function registerOnValidatorChange

packages/forms/src/directives/shared.ts:150–155  ·  view source on GitHub ↗
(validators: (V | Validator)[], onChange: () => void)

Source from the content-addressed store, hash-verified

148}
149
150function registerOnValidatorChange<V>(validators: (V | Validator)[], onChange: () => void): void {
151 validators.forEach((validator: V | Validator) => {
152 if ((<Validator>validator).registerOnValidatorChange)
153 (<Validator>validator).registerOnValidatorChange!(onChange);
154 });
155}
156
157/**
158 * Sets up disabled change handler function on a given form control if ControlValueAccessor

Callers 2

setUpValidatorsFunction · 0.70
cleanUpValidatorsFunction · 0.70

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected