Form validation for Vue in composition functions with Valibot.
Installation
Install vue-formor with your favorite package manager:
sh
npm i vue-formorsh
yarn add vue-formorsh
pnpm i vue-formorsh
bun add vue-formorTIP
Don't forget to install valibot.
sh
npm i valibotsh
yarn add valibotsh
pnpm i valibotsh
bun add valibotUsage
ts
import { useSchema } from 'vue-formor';
import * as v from 'valibot';WARNING
If you need to use valibot v0.30 or lower, please install vue-formor v4.x instead.
DANGER
For front-end development, it is best to use libraries that support tree shaking and modularization. It is recommended to use valibot. No longer recommend using zod and yup.
The functions useValibotSchema, useZodSchema, and useYupSchema will be removed in v6. Additionally, please use useSchema instead of useValibotSchema.