use-binds
v1.1.5
Published
generate form binds from veeValidate useForm() composable
Downloads
19
Maintainers
Readme
use-binds
This composable generate form binds from veeValidate useForm() composable.
Usage example:
npm i use-binds
or:
pnpm add use-binds
<script setup lang="ts">
import { useBinds } from 'use-binds';
const { handleSubmit, values, resetForm, defineComponentBinds } = useForm<ZodLoginSchemaType>({
validationSchema,
initialValues
})
const { formBinds } = useBinds(values, defineComponentBinds);
</script>
<template>
<v-form>
<v-text-field
v-bind="formBinds.phone.value"
label="Phone"
/>
<v-text-field
v-bind="formBinds.password.value"
label="Password"
/>
</v-form>
</template>