Skip to content

use/useField ​

Overview ​

Provides reactive field context including value tracking, validation, required-state, and server error handling for individual form fields.

Properties ​

FIELD_EMITS ​

Array of Vue event names emitted by field components. Pass to the emits option of a field component.

@vueda-spread emits

Type: string[]

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

FIELD_PROPS ​

Vue component props definition for field components. Spread into component options to include standard field identification, validation, display, value handling, and form context behavior props.

@vueda-spread props

Type: object

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

Methods ​

  • defaultIsRequiredViolation - Determines whether a value would violate a required field rule.
  • isUnsetValue - Determines whether a field's value is unset (i.e., it has not been explicitly set).
  • useField - Generate and provide a field context for a field.

Types ​

FieldContext ​

FieldContextRawProps ​

FieldContextRawState ​

FieldContextTestProps ​

UseFieldOptions ​

FieldContextProps ​

FieldContextProps = UnwrapNestedRefs

FieldContextState ​

FieldContextState = UnwrapNestedRefs

Source ​

client/lib/use/useField.js:1