• Overview
@angular/forms/signals

validateTree

function

Adds logic to a field to determine if the field or any of its child fields has validation errors.

API

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

validateTree

void

Adds logic to a field to determine if the field or any of its child fields has validation errors.

@parampathFieldPath<TValue, TPathKind>

The target path to add the validation logic to.

@paramlogicNoInfer<TreeValidator<TValue, TPathKind>>

A TreeValidator that returns the current validation errors. Errors returned by the validator may specify a target field to indicate an error on a child field.

@returnsvoid
Jump to details