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
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
debounceMs? | readonly | number | 300 | How long to wait after the trigger, in milliseconds. | core/src/definitions/async-validation-options.ts:43 |
on? | readonly | AsyncTrigger | '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
| Parameter | Type |
|---|---|
output | Output |
context | AsyncValidationContext<Deps> |
Returns
| ValidateResult | Promise<ValidateResult>