Gathering detailed insights and metrics for @vee-validate/zod
Gathering detailed insights and metrics for @vee-validate/zod
Gathering detailed insights and metrics for @vee-validate/zod
Gathering detailed insights and metrics for @vee-validate/zod
@zaalbarxx/vee-validate-zod
vee-validate integration with zod schema validation
use-binds
generate form binds from veeValidate useForm() composable
@wdns/vuetify-stepper-form
The Vuetify Stepper Form plugin provides a structured way to create multi-step forms using Vue 3, TypeScript, and Vuetify. It features a stepper layout that allows users to navigate between steps with form validation. The plugin is customizable and stream
npm install @vee-validate/zod
Typescript
Module System
Node Version
NPM Version
TypeScript (98.12%)
JavaScript (1.84%)
Shell (0.04%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
11,074 Stars
4,844 Commits
1,297 Forks
112 Watchers
12 Branches
354 Contributors
Updated on Jul 10, 2025
Latest Version
4.15.1
Package Id
@vee-validate/zod@4.15.1
Unpacked Size
27.90 kB
Size
6.02 kB
File Count
8
NPM Version
10.9.2
Node Version
22.16.0
Published on
Jun 07, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
1
Official vee-validate integration with Zod schema validation
Zod is an excellent library for value validation which mirrors static typing APIs.
In their own words it is a:
TypeScript-first schema validation with static type inference
You can use zod as a typed schema with the @vee-validate/zod
package:
1# npm 2npm install @vee-validate/zod 3# yarn 4yarn add @vee-validate/zod 5# pnpm 6pnpm add @vee-validate/zod
The @vee-valdiate/zod
package exposes a toTypedSchema
function that accepts any zod schema. Which then you can pass along to validationSchema
option on useForm
.
This makes the form values and submitted values typed automatically and caters for both input and output types of that schema.
1import { useForm } from 'vee-validate'; 2import { object, string } from 'zod'; 3import { toTypedSchema } from '@vee-validate/zod'; 4 5const { values, handleSubmit } = useForm({ 6 validationSchema: toTypedSchema( 7 object({ 8 email: string().min(1, 'required'), 9 password: string().min(1, 'required'), 10 name: string().optional(), 11 }) 12 ), 13}); 14 15// ❌ Type error, which means `values` is type-safe 16values.email.endsWith('@gmail.com'); 17 18handleSubmit(submitted => { 19 // No errors, because email is required! 20 submitted.email.endsWith('@gmail.com'); 21 22 // ❌ Type error, because `name` is not required so it could be undefined 23 // Means that your fields are now type safe! 24 submitted.name.length; 25});
You can also define default values on your zod schema directly and it will be picked up by the form:
1import { useForm } from 'vee-validate'; 2import { object, string } from 'zod'; 3import { toTypedSchema } from '@vee-validate/zod'; 4 5const { values, handleSubmit } = useForm({ 6 validationSchema: toTypedSchema( 7 object({ 8 email: string().default('something@email.com'), 9 password: string().default(''), 10 }) 11 ), 12});
Your initial values will be using the schema defaults, and also the defaults will be used if the values submitted is missing these fields.
You can also define preprocessors to cast your fields before submission:
1import { useForm } from 'vee-validate';
2import { object, number, preprocess } from 'zod';
3import { toTypedSchema } from '@vee-validate/zod';
4
5const { values, handleSubmit } = useForm({
6 validationSchema: toTypedSchema(
7 object({
8 age: preprocess(val => Number(val), number()),
9 })
10 ),
11});
12
13// typed as `unknown` since the source value can be anything
14values.age;
15
16handleSubmit(submitted => {
17 // will be typed as number because zod made sure it is!
18 values.age;
19});
No vulnerabilities found.
Reason
10 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 15/30 approved changesets -- score normalized to 5
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
35 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More