Skip to main content

ValidationErrorWithOptionalTargetNode

An error that may already define its target node.

Import​

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

When to use it​

Use for infrastructure accepting errors before or after target assignment. Check whether a target exists before using it.

Declaration​

type ValidationErrorWithOptionalTargetNode<TNode = unknown> = ValidationError & {
readonly targetNode?: TNode;
readonly formNode?: FormNodeBinding;
};

Type parameters​

ParameterConstraintDefault
TNodeUnconstrainedunknown

Declared members​

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

MemberMeaning
targetNodeNode whose validation state should own this error, when explicitly provided.
formNodeConcrete control binding that produced this error, when the error is binding-specific.