Skip to content

FieldSetMany ​

Overview ​

A field that manages a list of values by rendering one instance of manyComponent per entry. Provides Add and Remove buttons so users can grow or shrink the list. Every entry can be removed. Required lists need at least one entry; optional lists may be empty. Added entries require a value.

Theme entry: FieldSetMany

Props ​

NameTypeRequiredDefaultDescription
iconOverrideObjectnullA partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants.
nameStringyesThe field name, used as the path to look up and store the value in the form state.
formModelNameStringundefinedThe name of the form model for configuration lookup; usually provided by a parent field renderer.
clearServerErrorDependentsArray() => []Other fields whose server errors should be cleared when this field's value changes.
validationDependenciesArray() => []Other field paths this field depends on; their values are passed to validation and required functions.
readOnlyBooleanfalseWhether the field is read-only; disables editing and skips required validation.
requiredBooleannullWhether the field is required.
requiredMessageString"This field is required."Error message shown when a required field is left empty.
shouldRequireFnFunctionnullCustom function called with resolved field dependency values; determines whether the field should be required.
isRequiredViolationFunctionnullCustom function called with the current field value; checks whether the value violates the required rule. Defaults to rejecting null, undefined, empty string, false, and 0.
validateFunctionnullCustom validation function called with the current field value and resolved field dependency values; should return true when valid or an error message string when invalid.
labelStringnullThe label shown next to the field; defaults to the field name when omitted.
helpString""Help text displayed alongside the field.
modelValueString|Number|Boolean|Array|ObjectundefinedThe field's external model value; used only in contextless mode (v-model binding).
contextlessBooleanfalseWhen true, the field ignores any surrounding form context and manages its own state.
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
isRequiredViolationfunc(value) => !Array.isArray(value) || value.length === 0Checks whether the list violates its required rule; defaults to rejecting missing or empty arrays.
manyComponentobjectyesThe component used to render each individual entry in the list.

Slots ​

NameScopedDescription
labelyesOverride the field label.
field(fieldName)yesOverride the rendered row for a specific field entry.
defaultyes
destroyyesOverride the delete button for a row. The slot receives onClick, disabled, and index as slot props; removal is disabled when the field is read-only.
addyesOverride the add button.
field-set-level-choresOverride the validation block (help, errors, warnings) for this field set.

Full slot reference

Events ​

NameDescription
update:modelValueEmitted when the field value changes.

Full event reference

Source ​

client/lib/form/field-set/FieldSetMany.vue