vuestic-ui
vuestic-ui copied to clipboard
VaFormField component
Sometimes user want to make custom component and have validation:
<My3DPicker v-model="object3d" />
<VaFormField
:rules="[() => object3d.polygons.length < 3000 || 'Model must have less than 3000 polygons']"
name="object"
:value="object3d"
/>
For example, even if VaFileUplaod have no form features yet (see https://github.com/epicmaxco/vuestic-ui/issues/3991) I could use VaFormField.
Should be pretty easy to make such component, similar to VaSelect validation, but without VaSelect. Probably useFormChild
or useValidation
should be enough.
Would be nice to make sure we really need this component.
My thinking was to introduce something like a FormElement, which you could technically use to just trigger rules.