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, and the first entry is always required while subsequent entries are optional.

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.
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
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; the first entry's remove is disabled rather than hidden.
addOverride 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

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2