Skip to content

FieldContextRawProps ​

Properties ​

clearServerErrorDependents ​

Other fields that depend on this field.

Type: string[]

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

contextless ​

If true, the field will ignore the form context and manage its own state.

Type: boolean

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

formModelName ​

The name of the form model for configuration lookup.

Type: string

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

help ​

The help text for the field.

Type: string

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

isRequiredViolation ​

A custom function that checks whether the current field value violates the required rule (i.e. "is a violation"). The default behavior returns true when the value is null, undefined, an empty string, false, or 0.

Type: (value: any) => boolean

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

label ​

The label for the field.

Type: string

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

modelValue ​

The field's external model value (only used in context-less mode).

Type: any

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

name ​

The name of the field.

Type: string

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

readOnly ​

Whether the field is read-only.

Type: boolean

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

required ​

Whether the field is required.

Type: boolean

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

requiredMessage ​

The message to display if the field is required and empty.

Type: string

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

shouldRequireFn ​

A custom function that determines whether the field should be marked as required based on its configuration or validationDependencies (i.e. "can be required"). When provided, this overrides the explicit required prop.

Type: (validationDependencies: object) => boolean

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

validate ​

A custom validation function for the field. This function should return true when the field is valid. Otherwise, it should return a string with the desired error message.

Type: (value: any, validationDependencies: object) => boolean

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

validationDependencies ​

Other fields that this field depends on.

Type: string[]

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

Source ​

client/lib/use/useField.js:177