---
url: "https://vueda.dev/v3/reference/api/js/use/useField/types/FieldContext.md"
title: "FieldContext"
---

# FieldContext

## Properties

### blur {#blur}

Blurs (un-focuses) the field.

Type: `() => void`

Source: `client/lib/use/useField.js:156`

### clearErrors {#clearErrors}

Clears all errors associated with this field.

Type: `(childIndex: number) => void`

Source: `client/lib/use/useField.js:145`

### clearMessages {#clearMessages}

Clears all messages.

Type: `(childIndex: number) => void`

Source: `client/lib/use/useField.js:150`

### clearTouched {#clearTouched}

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

Type: `() => void`

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

### deleteError {#deleteError}

Removes a specific error by code.

Type: `(code: string) => void`

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

### deleteInitialValue {#deleteInitialValue}

Deletes the field's initial value.

Type: `() => void`

Source: `client/lib/use/useField.js:140`

### deleteMessage {#deleteMessage}

Removes a message by code.

Type: `(code: string) => void`

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

### deleteValue {#deleteValue}

Deletes the field's value, resetting it.

Type: `() => void`

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

### focus {#focus}

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

Type: `() => void`

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

### ignore {#ignore}

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

Type: `(name: string) => void`

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

### registerDependencyValues {#registerDependencyValues}

Registers a field with its dependency paths.

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

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

### registerIsModifiedHook {#registerIsModifiedHook}

Registers a hook that determines if the field is modified.

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

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

### registerIsRequiredHook {#registerIsRequiredHook}

Registers a hook that determines if the field is required.

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

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

### registerIsValidHook {#registerIsValidHook}

Registers a hook that determines if the field is valid.

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

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

### removeIgnore {#removeIgnore}

Removes the ignore status, making the field active again.

Type: `(name: string) => void`

Source: `client/lib/use/useField.js:160`

### reportWidgetDisabled {#reportWidgetDisabled}

Called by the field's widget with its disabled state, so the field shell can show it.

Type: `(disabled: boolean) => void`

Source: `client/lib/use/useField.js:173`

### setTouched {#setTouched}

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

Type: `() => void`

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

### state {#state}

The reactive state of the field.

Type: `object`

Source: `client/lib/use/useField.js:134`

### unregisterDependencyValues {#unregisterDependencyValues}

Unregisters a field for dependency tracking.

Type: `(id: string) => void`

Source: `client/lib/use/useField.js:172`

### unregisterIsModifiedHook {#unregisterIsModifiedHook}

Unregisters a previously registered modified-state hook.

Type: `(id: string) => void`

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

### unregisterIsRequiredHook {#unregisterIsRequiredHook}

Unregisters a previously registered required-state hook.

Type: `(id: string) => void`

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

### unregisterIsValidHook {#unregisterIsValidHook}

Unregisters a previously registered validation-state hook.

Type: `(id: string) => void`

Source: `client/lib/use/useField.js:168`

### updateError {#updateError}

Updates the error message for a given code.

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

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

### updateInitialValue {#updateInitialValue}

Updates the field's initial value.

Type: `(newValue: any) => void`

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

### updateMessage {#updateMessage}

Updates a specific message.

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

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

### updateValue {#updateValue}

Updates the field's value.

Type: `(newValue: any) => void`

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

## Source

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