Skip to content

API ReferenceValidationInterface

ValidationRuleDefinition\<P, DependsOn, RevalidateOn\>

The topology and callbacks accepted by defineValidationRule.

Type Parameters

Type Parameter
P
DependsOn extends readonly keyof P[]
RevalidateOn extends readonly keyof P[]

Properties

async?

readonly optional async?: (values, ctx, signal) => Promise<ValidationIssue[]>;

Parameters

ParameterType
valuesValidationRuleValues<P, DependsOn, RevalidateOn>
ctxSDKContext
signalAbortSignal

Returns

Promise<ValidationIssue[]>


dependsOn

readonly dependsOn: DependsOn;

errorField

readonly errorField: keyof P;

errorFields?

readonly optional errorFields?: readonly keyof P[];

revalidateOn?

readonly optional revalidateOn?: RevalidateOn;

sync?

readonly optional sync?: (values, ctx) => ValidationIssue[];

Parameters

ParameterType
valuesValidationRuleValues<P, DependsOn, RevalidateOn>
ctxSDKContext

Returns

ValidationIssue[]