The fieldset's modelValue is an
Object containing properties where the key is the
name attribute of the field, and the value is the
modelValue of the field.
Disabling a fieldset disables all its child fields. When enabling a fieldset, fields that have disabled explicitly set will stay disabled.
Fieldsets can also be nested. The level of nesting will correspond one to one with the
You can create validators that work on a fieldset level.
Below, we mimic a
required validator, but on the fieldset.
Try it by typing something in the input, then removing it.
You can have your fieldset validator take into consideration multiple fields.
Alternatively you can also let the fieldset validator be dependent on the error states of its child fields.
Simply loop over the formElements inside your Validator's
this.formElements.some(el => el.hasFeedbackFor.includes('error'));
You can have your fieldset validator take into accounts multiple nested fieldsets.