Skip to content

Interface: AsyncValidationOptions<Output, Deps> ​

Defined in: core/src/definitions/async-validation-options.ts:39

A check against something outside the form, such as a server. It runs only while the schema passes, receives the output and runs again at every validate() and submit, which wait for its answer.

Type Parameters ​

Type Parameter
Output
Deps

Properties ​

PropertyModifierTypeDefault valueDescriptionDefined in
debounceMs?readonlynumber300How long to wait after the trigger, in milliseconds.core/src/definitions/async-validation-options.ts:43
on?readonlyAsyncTrigger'change'-core/src/definitions/async-validation-options.ts:41

Methods ​

run() ​

ts
run(output, context): 
  | ValidateResult
| Promise<ValidateResult>;

Defined in: core/src/definitions/async-validation-options.ts:45

Returns an error, a list of errors or undefined. If it throws, the check fails.

Parameters ​

ParameterType
outputOutput
contextAsyncValidationContext<Deps>

Returns ​

| ValidateResult | Promise<ValidateResult>

Released under the MIT License.