All skills
skilld-dev avatar

/vee-validate-skilld

@b9c39cb

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.

Use this Skill: https://skilld.dev/gh/skilld-dev/vue-ecosystem-skills/vee-validate-skilld

This session only. Nothing lands on disk.

referencescomponents.md

≈977 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Components reference

Declarative higher-order components. Props verified in dist/vee-validate.d.ts. Docs: https://vee-validate.logaretm.com/v4/guide/components/handling-forms/

Form

Props (dist/vee-validate.d.ts:950-1051): as (tag, default 'form'), validationSchema, initialValues, initialErrors, initialTouched, validateOnMount, onSubmit, onInvalidSubmit, keepValues, name.

Scoped slot props (FormSlotProps, dist/vee-validate.d.ts:943-949): meta, errors, errorBag, values, isSubmitting, isValidating, submitCount, controlledValues, plus validate, validateField, handleReset, setErrors, setFieldError, setFieldValue, setValues, setFieldTouched, setTouched, resetForm, resetField, handleSubmit(evt, cb?), submitForm, getValues, getMeta, getErrors.

<Form :validation-schema="schema" @submit="onSubmit" v-slot="{ errors, meta }">
  ...
  <button :disabled="!meta.valid">Submit</button>
</Form>

Prefer @submit over slot handleSubmit unless you need it inline. onInvalidSubmit receives { values, evt, errors, results } (dist/vee-validate.d.ts:352-358).

Field

Props (dist/vee-validate.d.ts:583-834): name (required), as, rules, label, bails, type, validateOnMount, validateOnBlur, validateOnChange, validateOnInput, validateOnModelUpdate, uncheckedValue, modelValue, standalone, keepValue. Instance members expose value, meta, errors, errorMessage, setErrors, setTouched, reset, validate, setValue (since 4.13.0), handleChange (dist/vee-validate.d.ts:927-941).

Rendering:

<!-- Renders an input[type=text] by default -->
<Field name="email" :rules="required" />

<!-- as prop: any element or component -->
<Field name="country" as="select" />
<Field name="field" as="my-text-field" />

<!-- scoped slot: renderless, bind the field object yourself -->
<Field name="password" v-slot="{ field, errorMessage }">
  <input v-bind="field" />
  <span>{{ errorMessage }}</span>
</Field>

With v-slot, v-model goes on the Field tag, never on the inner input (it conflicts with v-bind="field") (https://vee-validate.logaretm.com/v4/api/field/#using-v-model). The slot also exposes componentField for component bindings, value, meta, errors, errorMessage, handleChange, handleBlur, validate, resetField, setValue (dist/vee-validate.d.ts:574-582).

Checkboxes and radios: give each input a value attr; vee-validate tracks the group by the shared name. uncheckedValue sets what an unchecked checkbox writes. Select multiple is partially supported: values are picked up but the initial UI state is not set; bind selected on options or use v-slot (https://vee-validate.logaretm.com/v4/api/field/).

Docs: https://vee-validate.logaretm.com/v4/api/field/

FieldArray

Props: name only (dist/vee-validate.d.ts:1205-1210). Slot props mirror useFieldArray: fields, push, remove, swap, insert, update, replace, prepend, move (dist/vee-validate.d.ts:1255-1266).

<FieldArray name="links" v-slot="{ fields, push, remove }">
  <li v-for="(entry, idx) in fields" :key="entry.key">
    <Field :name="`links[${idx}].url`" />
    <button type="button" @click="remove(idx)">x</button>
  </li>
  <button type="button" @click="push({ url: '' })">Add</button>
</FieldArray>

Known limitation: FieldArray does not track radio groups inside array items well (https://github.com/logaretm/vee-validate/issues/5013).

Docs: https://vee-validate.logaretm.com/v4/api/field-array/

ErrorMessage

Props: name, as (default renders a span with the message; omit as to use the slot) (dist/vee-validate.d.ts:1269-1354). Slot props: { message }.

<Field name="email" />
<ErrorMessage name="email" as="div" />

Docs: https://vee-validate.logaretm.com/v4/api/error-message/

Source: SKILL.md on GitHub

No alerts8d3 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    The vee-validate-skilld skill is a comprehensive documentation and reference suite for the vee-validate Vue.js form library. It contains API details, best practices, tutorials, and community discussions. No security risks or malicious behaviors were detected during analysis.

  • Socket8d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

Signed by skilld at b9c39cb. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated last week

README badge

README badge for skilld-dev/vue-ecosystem-skills/vee-validate-skilld