Skip to main content

ValidationErrorWithTargetNode

An error associated with a specific target node.

Import

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

When to use it

Use when consuming errors already associated with a node. The generic preserves the target node type, and binding-specific attribution may also be available.

Declaration

type ValidationErrorWithTargetNode<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 owns this error.
formNodeConcrete control binding that produced this error, when the error is binding-specific.