HttpValidatorOptions
interface
Options that indicate how to create an httpResource for async validation for a field, and map its result to validation errors.
request
((ctx: FieldContext<TValue, TPathKind>) => string | undefined) | ((ctx: FieldContext<TValue, TPathKind>) => HttpResourceRequest | undefined)
A function that receives the field context and returns the url or request for the httpResource. If given a URL, the underlying httpResource will perform an HTTP GET on it.
errors
MapToErrorsFn<TValue, TResult, TPathKind>
A function that takes the httpResource result, and the current field context and maps it to a list of validation errors.
options
HttpResourceOptions<TResult, unknown> | undefined
The options to use when creating the httpResource.
Jump to details