Skip to Content
APIInterfacesInterface: StringArrayFieldConfig<TFieldValues>

Hero Hook Form API v2.15.0


Hero Hook Form API / StringArrayFieldConfig

Interface: StringArrayFieldConfig<TFieldValues>

Defined in: types.ts:243 

Extends

Type Parameters

TFieldValues

TFieldValues extends FieldValues

Properties

name

name: Path<TFieldValues>

Defined in: types.ts:138 

Inherited from

BaseFormFieldConfig.name


label?

optional label: string

Defined in: types.ts:139 

Inherited from

BaseFormFieldConfig.label


description?

optional description: string

Defined in: types.ts:140 

Inherited from

BaseFormFieldConfig.description


className?

optional className: string

Defined in: types.ts:141 

Inherited from

BaseFormFieldConfig.className


isDisabled?

optional isDisabled: boolean

Defined in: types.ts:142 

Inherited from

BaseFormFieldConfig.isDisabled


rules?

optional rules: RegisterOptions<TFieldValues, Path<TFieldValues>>

Defined in: types.ts:143 

Inherited from

BaseFormFieldConfig.rules


condition()?

optional condition: (values) => boolean

Defined in: types.ts:146 

Parameters

values

Partial<TFieldValues>

Returns

boolean

Inherited from

BaseFormFieldConfig.condition


dependsOn?

optional dependsOn: Path<TFieldValues>

Defined in: types.ts:147 

Inherited from

BaseFormFieldConfig.dependsOn


dependsOnValue?

optional dependsOnValue: unknown

Defined in: types.ts:148 

Inherited from

BaseFormFieldConfig.dependsOnValue


group?

optional group: string

Defined in: types.ts:151 

Inherited from

BaseFormFieldConfig.group


ariaLabel?

optional ariaLabel: string

Defined in: types.ts:154 

Inherited from

BaseFormFieldConfig.ariaLabel


ariaDescribedBy?

optional ariaDescribedBy: string

Defined in: types.ts:155 

Inherited from

BaseFormFieldConfig.ariaDescribedBy


type

type: "stringArray"

Defined in: types.ts:245 


defaultValue?

optional defaultValue: string[]

Defined in: types.ts:246 


stringArrayProps?

optional stringArrayProps: object

Defined in: types.ts:247 

placeholder?

optional placeholder: string

Placeholder text for the input

maxItems?

optional maxItems: number

Maximum number of items allowed

minItems?

optional minItems: number

Minimum number of items required

allowDuplicates?

optional allowDuplicates: boolean

Allow duplicate values

validateItem()?

optional validateItem: (item) => string | true

Custom validation function for each item

Parameters
item

string

Returns

string | true

transformItem()?

optional transformItem: (item) => string

Transform item before adding (e.g., trim whitespace)

Parameters
item

string

Returns

string

renderChip()?

optional renderChip: (item, onRemove) => ReactNode

Custom chip render function

Parameters
item

string

onRemove

() => void

Returns

ReactNode

addButtonText?

optional addButtonText: string

Custom add button text

showAddButton?

optional showAddButton: boolean

Whether to show add button or use enter key

readOnly?

optional readOnly: boolean

When true, only display items: no input, no add button, no remove buttons