Skip to main content

ValidatorReadonlyApi

Reactive value and navigation shared by all validator context specializations.

Import

import type { ValidatorReadonlyApi } from '@ngblocks/form-nodes';

When to use it

Use when a validator integration should depend only on reactive value and navigation. Avoid requiring mutation operations when observation is sufficient.

Declaration

type ValidatorReadonlyApi<TValue> = FieldContext<TValue> & {
readonly parent: Signal<any>;
readonly path: Signal<readonly string[]>;
};

Type parameters

ParameterConstraintDefault
TValueUnconstrainedRequired

Declared members

The declaration above also includes inherited contracts and overloads where applicable.

MemberMeaning
parentImmediate parent inferred by a specialized validator API.
pathProperty names and array indexes locating the validated node from its root.