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

Function normalizeValidators

packages/forms/src/validators.ts:653–659  ·  view source on GitHub ↗
(validators: (V | Validator | AsyncValidator)[])

Source from the content-addressed store, hash-verified

651 * as well as represented as a validator class.
652 */
653export function normalizeValidators<V>(validators: (V | Validator | AsyncValidator)[]): V[] {
654 return validators.map((validator) => {
655 return isValidatorFn<V>(validator)
656 ? validator
657 : (((c: AbstractControl) => validator.validate(c)) as unknown as V);
658 });
659}
660
661/**
662 * Merges synchronous validators into a single validator function.

Callers 3

validators_spec.tsFile · 0.90
composeValidatorsFunction · 0.85
composeAsyncValidatorsFunction · 0.85

Calls 3

isValidatorFnFunction · 0.85
mapMethod · 0.80
validateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…