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

Function pickAsyncValidators

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

Source from the content-addressed store, hash-verified

207 * Gets async validators from either an options object or given validators.
208 */
209export function pickAsyncValidators(
210 asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null,
211 validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null,
212): AsyncValidatorFn | AsyncValidatorFn[] | null {
213 if (typeof ngDevMode === 'undefined' || ngDevMode) {
214 if (isOptionsObj(validatorOrOpts) && asyncValidator) {
215 console.warn(asyncValidatorsDroppedWithOptsWarning);
216 }
217 }
218 return (isOptionsObj(validatorOrOpts) ? validatorOrOpts.asyncValidators : asyncValidator) || null;
219}
220
221/**
222 * Creates async validator function by combining provided async validators.

Callers 3

constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls 2

isOptionsObjFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…