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

Function pickValidators

packages/forms/src/model/abstract_model.ts:193–197  ·  view source on GitHub ↗
(
  validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,
)

Source from the content-addressed store, hash-verified

191 * Gets validators from either an options object or given validators.
192 */
193export function pickValidators(
194 validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,
195): ValidatorFn | ValidatorFn[] | null {
196 return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.validators : validatorOrOpts) || null;
197}
198
199/**
200 * Creates validator function by combining provided validators.

Callers 3

constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls 1

isOptionsObjFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…