Browse documentation

FormOptions

Type. FormStore state, schema, transforms and submit options.

Table of contents

Category

Type

Type import

ts
import type { FormOptions } from "valyrian.js/forms";

Public signature

ts
type FormOptions<TState extends FormState> = { state: TState; schema: Record<string, unknown>; clean?: FormTransformMap<TState>; format?: FormTransformMap<TState>; onSubmit?: (values: TState) => Promise<void> | void; };

Type usage

FormOptions combines initial typed state, schema, optional transforms and submission.