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

Type Parameters

Properties

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