interface MobxZodPlugin {
    name: string;
    onAfterSubmit?: (<T>(form) => void);
    onAfterValidate?: (<T>(form) => void);
    onBeforeSubmit?: (<T>(form) => void);
    onBeforeValidate?: (<T>(form) => void);
    onEnd?: (<T>(form) => void);
    onStart?: (<T>(form) => void);
}

Properties

name: string
onAfterSubmit?: (<T>(form) => void)

Executed at the end of handleSubmit, after the effects (e.g. focusing the error) for the validation, in reverted order.

Type declaration

onAfterValidate?: (<T>(form) => void)

Executed at the end of validate, in reverted order.

Type declaration

onBeforeSubmit?: (<T>(form) => void)

Executed at the start of handleSubmit (after user submits), before we queue a validation task, in original order. You can use this hook to modify the form content, before they are validated. For example, automatically fill some fields.

Type declaration

onBeforeValidate?: (<T>(form) => void)

Executed before we parse the raw input in validate, in original order.

Type declaration

onEnd?: (<T>(form) => void)

Executed when the form in started, in reverted order. Should not throw.

Type declaration

onStart?: (<T>(form) => void)

Executed when the form in started, in original order. Should not throw.

Type declaration