interface ReactFormOptions<T> {
    enableReinitialize?: boolean;
    id?: string;
    initialOutput?: TypeOf<T>;
    plugins?: MobxZodPlugin[];
    setActionOptions?: InputSetActionOptions;
    shouldFocusError?: false | "first-y" | "first-x";
    validateOnMount?: boolean;
}

Type Parameters

  • T extends MobxZodTypes

Hierarchy

  • MobxZodFormOptions<T>
    • ReactFormOptions

Properties

enableReinitialize?: boolean

When input initialOutput changes (per useEffect), set the output as the new one. @default: false

id?: string
initialOutput?: TypeOf<T>
plugins?: MobxZodPlugin[]
setActionOptions?: InputSetActionOptions
shouldFocusError?: false | "first-y" | "first-x"

Should we focus the element with error after submitting?

  1. false: do not focus at all.
  2. "first-y": focus on the element having the smallest y, then x. Useful when your layout is a single column.
  3. "first-x": focus on the element having the smallest x, then y. Useful when you expect your user complete the form column by column.
validateOnMount?: boolean