Skip to main content

FieldContext

Reactive context available to validation functions for the current field.

Import

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

When to use it

Use when a contract specifically requires the low-level reactive field context. Consumer-authored reusable rules normally use ValidatorContext or contextual inference through validator().

Declaration

type FieldContext<TValue> = {
readonly value: Signal<TValue>;
};

Type parameters

ParameterConstraintDefault
TValueUnconstrainedRequired

Declared members

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

MemberMeaning
valueCurrent value of the node being validated. Reading it creates a reactive dependency.