vuestic-ui icon indicating copy to clipboard operation
vuestic-ui copied to clipboard

VaFormField component

Open m0ksem opened this issue 1 year ago • 2 comments

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.

m0ksem avatar Nov 01 '23 16:11 m0ksem

Should be pretty easy to make such component, similar to VaSelect validation, but without VaSelect. Probably useFormChild or useValidation should be enough.

m0ksem avatar Nov 06 '23 15:11 m0ksem

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.

asvae avatar Dec 25 '23 19:12 asvae