• Overview
@angular/forms/signals

validate

function

Adds logic to a field to determine if the field has validation errors.

API

function validate<TValue, TPathKind extends PathKind = PathKind.Root>(
  path: FieldPath<TValue, TPathKind>,
  logic: NoInfer<FieldValidator<TValue, TPathKind>>,
): void;

validate

void

Adds logic to a field to determine if the field has validation errors.

@parampathFieldPath<TValue, TPathKind>

The target path to add the validation logic to.

@paramlogicNoInfer<FieldValidator<TValue, TPathKind>>

A Validator that returns the current validation errors.

@returnsvoid
Jump to details