vee-validate-skilld — Claude Code skill: Vue 3 form validation
vee-validate-skilld — a skill for writing, reviewing, and debugging Vue 3 forms with vee-validate 4.15.x. Covers Composition API, validation schema patterns, typed-schema integration, version-specific changes since 4.9, and common pitfalls.
MIT 188 installs ★ 186 updated 2026-10-10
npx skills add skilld-dev/vue-ecosystem-skills --skill vee-validate-skilld -a claude-codeWhat vee-validate-skilld does
vee-validate-skilld teaches two approaches to form handling: Composition API with useForm and defineField (recommended for new work) and declarative components (Form and Field) with validator functions. The skill covers correct field binding using defineField, which returns a [model, props] pair for v-model and v-bind, handling nested objects and arrays via dot notation and array indices, typed schemas through toTypedSchema from @vee-validate/yup, @vee-validate/zod, or @vee-validate/valibot, validation modes (blur and change by default), and when to display errors only after user interaction.
The skill documents version-specific changes affecting users on 4.9+: useField inside custom components does not sync v-model by default (breaking change in 4.10.0), and useFieldModel and defineComponentBinds are deprecated. It helps avoid common mistakes like forgetting toTypedSchema when using yup, zod, or valibot schemas, or assuming the errors object is nested—it is always flat, requiring the exact field path even for deeply nested fields.
What it helps with
- Set up field binding with Composition API validation correctly
- Work with nested objects and dynamic arrays in forms
- Use typed schemas from yup, zod, or valibot
- Decide when and how to show validation errors
- Update form code after upgrading vee-validate
Example prompts for the agent
- Build a signup form with
useFormanddefineFieldfor name, email, password - Debug the error “No such validator 'VVTypedSchema' exists” in validation schema
- Show how to iterate a dynamic field array using
useFieldArrayandFieldArray
How to install vee-validate-skilld
1Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill vee-validate-skilld -a claude-code2Manually: put the files in place
~/.claude/skills/vee-validate-skilld/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/vee-validate-skilld/
1Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill vee-validate-skilld -a codex2Manually: put the files in place
.agents/skills/vee-validate-skilld/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill vee-validate-skilld -a cursor2Manually: put the files in place
.cursor/skills/vee-validate-skilld/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install skilld-dev/vue-ecosystem-skills skills/vee-validate-skilld2Manually: put the files in place
.github/skills/vee-validate-skilld/SKILL.md1Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill vee-validate-skilld -a gemini-cli2Platform CLI
gemini skills install https://github.com/skilld-dev/vue-ecosystem-skills --path skills/vee-validate-skilldManually: put the files in place
.devin/skills/vee-validate-skilld/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add skilld-dev/vue-ecosystem-skills --skill vee-validate-skilld -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about vee-validate-skilld
How do I install vee-validate-skilld in Claude Code?
Run npx skills add skilld-dev/vue-ecosystem-skills --skill vee-validate-skilld -a claude-code, then open ~/.claude/skills/vee-validate-skilld/SKILL.md to verify.
What does vee-validate-skilld provide?
Practical examples and best practices for vee-validate 4.15.x on Vue 3: how to use Composition API and components, work with typed schemas, avoid mistakes with nested fields and dynamic arrays.
What causes the “No such validator 'VVTypedSchema' exists” error?
You passed a raw yup, zod, or valibot schema without wrapping it in toTypedSchema. Import toTypedSchema from the matching package (@vee-validate/yup, @vee-validate/zod, or @vee-validate/valibot) and wrap your schema before passing it to useForm.
Source text
SKILL.md · MIT
--- name: vee-validate-skilld description: Use when writing, reviewing, or debugging Vue.js forms that import vee-validate (useForm, defineField, useField, useFieldArray, Form, Field, FieldArray, ErrorMessage). Provides correct v4.15.x Composition API and component usage, validation schema patterns, typed-schema integration, version-specific API changes since 4.9, deprecations, and known pitfalls. license: MIT --- # vee-validate 4.15.1 Form validation for Vue 3. Facts below come from the prepared source (`dist/vee-validate.d.ts`, `dist/vee-validate.mjs`, `package.json`) and official docs at https://vee-validate.logaretm.com/v4/. ## Environment - Package `[email protected]` (`package.json:3`). Requires `vue ^3.4.26` as peer (`package.json:42`). - ESM + CJS, `sideEffects: false`, single entry `vee-validate` (`package.json:11-26`). - v4 supports Vue 3 only. Vue 2 needs vee-validate 2.x/3.x (README:69-72). - Schema adapters live in separate packages: `@vee-validate/yup`, `@vee-validate/zod`, `@vee-validate/valibot`; global rules in `@vee-validate/rules`; messages in `@vee-validate/i18n`. ## Two API styles **Composition API (preferred for new code).** `useForm` + `defineField` + `handleSubmit`: ```vue <script setup> import { useForm } from 'vee-validate'; function required(value) { return value ? true : 'This field is required'; } const { defineField, handleSubmit, errors } = useForm({ validationSchema: { field: required }, }); const [field, fieldProps] = defineField('field'); const onSubmit = handleSubmit(values => { console.log(values); }); </script> <template> <form @submit="onSubmit"> <input v-model="field" v-bind="fieldProps" /> <span>{{ errors.field }}</span> <button>Submit</button> </form> </template> ``` Source: README:84-118, https://vee-validate.logaretm.com/v4/guide/composition-api/getting-started/ **Declarative components.** `Form` + `Field` with scoped slots: ```vue <script setup> import { Field, Form } from 'vee-validate'; function required(value) { return value ? true : 'This field is required'; } function onSubmit(values) { console.log(values); } </script> <template> <Form v-slot="{ errors }" @submit="onSubmit"> <Field name="field" :rules="required" /> <span>{{ errors.field }}</span> <button>Submit</button> </Form> </template> ``` Source: README:122-153, https://vee-validate.logaretm.com/v4/guide/components/handling-forms/ ## Core rules - Bind fields with `defineField(path, config?)`. It returns `[model, props]`; spread the props with `v-bind` and the model with `v-model` (`dist/vee-validate.d.ts:443`, https://vee-validate.logaretm.com/v4/api/use-form/#definefield). - Never write directly to `values.field`; use the `defineField` model, `setFieldValue`, or `useSetFieldValue`. - `useFieldModel`, `defineComponentBinds`, and `defineInputBinds` are deprecated in favor of `defineField` (`dist/vee-validate.d.ts:444-459`). - Show errors only after interaction, e.g. `v-if="errorMessage && meta.touched"`, to avoid aggressive validation UX (https://vee-validate.logaretm.com/v4/guide/best-practices/#avoiding-aggressive-validation). - For TypeScript, wrap yup/zod/valibot schemas with `toTypedSchema` from the matching `@vee-validate/*` package. Passing a raw schema without it fails with "No such validator 'VVTypedSchema' exists" (https://vee-validate.logaretm.com/v4/guide/composition-api/typed-schema/, https://github.com/logaretm/vee-validate/discussions/4819). - `useField` inside a custom component must not sync its v-model by default (`syncVModel` defaults to `false`, breaking change in 4.10.0). Opt in per field with `syncVModel: true` or a model prop name string (`dist/vee-validate.mjs:1862`). - Field names are paths. Dots nest objects, `[0]` indexes arrays; wrap the name in brackets, e.g. `[user.name]`, to treat dots as literal (https://vee-validate.logaretm.com/v4/guide/composition-api/nested-objects-and-arrays/). - The `errors` object is always flat: reference the exact path string used as the field name, brackets included (https://vee-validate.logaretm.com/v4/guide/composition-api/nested-objects-and-arrays/). - Iterate array fields with `fields` from `useFieldArray` and key `v-for` by `entry.key` (a stable id, never the index) (https://vee-validate.logaretm.com/v4/guide/composition-api/nested-objects-and-arrays/). - Pass reactive field names as getters (`useField(() => props.name)`) so vee-validate tracks name changes (https://vee-validate.logaretm.com/v4/guide/composition-api/caveats/). - Keep schemas non-reactive: declare them outside `ref`/`reactive` or wrap with `markRaw` to avoid deep reactivity overhead (https://vee-validate.logaretm.com/v4/guide/best-practices/#reactive-schemas). - `handleSubmit.withControlled(cb)` submits only fields registered with `useField`/`defineField` (`dist/vee-validate.d.ts:430-432`); note typed schemas can still surface all initial values (open issue: https://github.com/logaretm/vee-validate/issues/4960). ## Validation modes Global defaults: `validateOnBlur: true`, `validateOnChange: true`, `validateOnInput: false`, `validateOnModelUpdate: true`, `bails: true`. Change globally with `configure()`; note these four trigger flags only apply to the `<Field>` component, not `useField` (https://vee-validate.logaretm.com/v4/api/configuration/). To validate only on submit, disable input/change/blur triggers per field in `defineField` config or globally (https://github.com/logaretm/vee-validate/discussions/4903). ## References - [Composition API](./references/composition-api.md): `useForm`, `defineField`, `useField`, `useFieldArray`, state and setter composables, form context. - [Components](./references/components.md): `Form`, `Field`, `FieldArray`, `ErrorMessage` props, slots, rendering, v-model rules. - [Validation](./references/validation.md): validator functions, object schemas, typed schemas, global rules, i18n, standalone `validate` utils. - [API surface](./references/api-surface.md): every runtime export and notable type, cited to `dist/vee-validate.d.ts`. - [Version changes](./references/version-changes.md): API additions, breaking changes, and deprecations from 4.9.0 to 4.15.1. - [Pitfalls](./references/pitfalls.md): composition caveats, nested path rules, array fields, known open issues.
© skilld-dev · MIT · skilld-dev/vue-ecosystem-skills