Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Type Alias: RuleValidator()<T>

RuleValidator<T> = (value, store, args?, formData?) => Promise<RuleValidatorResult> | RuleValidatorResult

The function that checks the value and returns the result of the rule validation, see RuleValidatorResult.

Type Parameters

T

T = any

the value type.

Parameters

value

T

the value.

store

IStore

the form viewer settings

args?

Record<string, unknown>

the rule arguments.

formData?

IFormData

the form data.

Returns

Promise<RuleValidatorResult> | RuleValidatorResult