Skip to content

FieldContext

Properties

blur

Blurs (un-focuses) the field.

Type: () => void

Source: client/lib/use/useField.js:155

clearErrors

Clears all errors associated with this field.

Type: (childIndex: number) => void

Source: client/lib/use/useField.js:144

clearMessages

Clears all messages.

Type: (childIndex: number) => void

Source: client/lib/use/useField.js:149

clearTouched

Clears the touched state of the field, making it "untouched."

Type: () => void

Source: client/lib/use/useField.js:153

deleteError

Removes a specific error by code.

Type: (code: string) => void

Source: client/lib/use/useField.js:143

deleteInitialValue

Deletes the field's initial value.

Type: () => void

Source: client/lib/use/useField.js:139

deleteMessage

Removes a message by code.

Type: (code: string) => void

Source: client/lib/use/useField.js:148

deleteValue

Deletes the field's value, resetting it.

Type: () => void

Source: client/lib/use/useField.js:137

focus

Focuses on the field (usually for accessibility or validation).

Type: () => void

Source: client/lib/use/useField.js:154

ignore

Marks the field as ignored, so validation does not apply.

Type: (name: string) => void

Source: client/lib/use/useField.js:158

registerDependencyValues

Registers a field with its dependency paths.

Type: (hook: (dependencyValues: object) => void) => string

Source: client/lib/use/useField.js:170

registerIsModifiedHook

Registers a hook that determines if the field is modified.

Type: (hook: () => boolean) => string

Source: client/lib/use/useField.js:162

registerIsRequiredHook

Registers a hook that determines if the field is required.

Type: (hook: () => boolean) => string

Source: client/lib/use/useField.js:164

registerIsValidHook

Registers a hook that determines if the field is valid.

Type: (hook: () => string | boolean) => string

Source: client/lib/use/useField.js:166

removeIgnore

Removes the ignore status, making the field active again.

Type: (name: string) => void

Source: client/lib/use/useField.js:159

setTouched

Marks the field as "touched" (e.g., user clicked away).

Type: () => void

Source: client/lib/use/useField.js:152

state

The reactive state of the field.

Type: object

Source: client/lib/use/useField.js:133

unregisterDependencyValues

Unregisters a field for dependency tracking.

Type: (id: string) => void

Source: client/lib/use/useField.js:171

unregisterIsModifiedHook

Unregisters a previously registered modified-state hook.

Type: (id: string) => void

Source: client/lib/use/useField.js:163

unregisterIsRequiredHook

Unregisters a previously registered required-state hook.

Type: (id: string) => void

Source: client/lib/use/useField.js:165

unregisterIsValidHook

Unregisters a previously registered validation-state hook.

Type: (id: string) => void

Source: client/lib/use/useField.js:167

updateError

Updates the error message for a given code.

Type: (code: string, message: string) => void

Source: client/lib/use/useField.js:142

updateInitialValue

Updates the field's initial value.

Type: (newValue: any) => void

Source: client/lib/use/useField.js:138

updateMessage

Updates a specific message.

Type: (code: string, message: string) => void

Source: client/lib/use/useField.js:147

updateValue

Updates the field's value.

Type: (newValue: any) => void

Source: client/lib/use/useField.js:136

Source

client/lib/use/useField.js:132

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2