Skip to content

API ReferenceValidationType Alias

ValidationRuleValues\<P, DependsOn, RevalidateOn\>

type ValidationRuleValues<P, DependsOn, RevalidateOn> = {
readonly [Key in DependsOn[number]]-?: NonNullable<P[Key]>;
} & { readonly [Key in Exclude<RevalidateOn[number], DependsOn[number]>]?: P[Key] };

Values visible to a rule callback created by defineValidationRule. Required dependencies are non-nullish because the runner gates the rule; additional revalidation fields remain optional.

Type Parameters

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