• Overview
@angular/forms/signals

validateAsync

function

Adds async validation to the field corresponding to the given path based on a resource. Async validation for a field only runs once all synchronous validation is passing.

API

function validateAsync<
  TValue,
  TParams,
  TResult,
  TPathKind extends PathKind = PathKind.Root,
>(
  path: FieldPath<TValue, TPathKind>,
  opts: AsyncValidatorOptions<TValue, TParams, TResult, TPathKind>,
): void;

validateAsync

void

Adds async validation to the field corresponding to the given path based on a resource. Async validation for a field only runs once all synchronous validation is passing.

@parampathFieldPath<TValue, TPathKind>

A path indicating the field to bind the async validation logic to.

@paramoptsAsyncValidatorOptions<TValue, TParams, TResult, TPathKind>

The async validation options.

@returnsvoid
Jump to details