Skip to content

Interface: CreateFormOptions<FormDefinition> ​

Defined in: core/src/form/form-types.ts:36

Options of createForm.

Extends ​

Extended by ​

Type Parameters ​

Type Parameter
FormDefinition

Properties ​

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
focusElement?readonlyFocusElementOptionelement => element.focus()How an element is focused, for error focus and node.focus().FormDefaults.focusElementcore/src/form/form-types.ts:26
formatError?readonlyFormatErrorOptionerror => error.codeTurns an error into text, for errorMessage and error summaries.FormDefaults.formatErrorcore/src/form/form-types.ts:28
id?readonlystringformtree-<counter>Prefix of every DOM id in the form, as in checkout:contact.email.-core/src/form/form-types.ts:38
initialValue?readonlyDeepPartial<DraftOf<FormDefinition>>undefinedThe starting draft. It may be partial; anything left out starts empty.-core/src/form/form-types.ts:40
mode?readonlyValidationMode'onTouched'When errors become visible. Definitions can override it.FormDefaults.modecore/src/form/form-types.ts:15
reValidateMode?readonlyReValidateMode'onChange'When errors update after a node that contains them is submitted. Until then, mode decides. Definitions can override it.FormDefaults.reValidateModecore/src/form/form-types.ts:22
shouldFocusError?readonlyFocusErrorOptiontrueWhere focus goes after a failed submit.FormDefaults.shouldFocusErrorcore/src/form/form-types.ts:24

Released under the MIT License.