Gathering detailed insights and metrics for @vee-validate/yup
Gathering detailed insights and metrics for @vee-validate/yup
Gathering detailed insights and metrics for @vee-validate/yup
Gathering detailed insights and metrics for @vee-validate/yup
@zaalbarxx/vee-validate-yup
vee-validate integration with yup 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/yup
Typescript
Module System
Node Version
NPM Version
81.6
Supply Chain
99.5
Quality
86.6
Maintenance
100
Vulnerability
99.6
License
TypeScript (98.12%)
JavaScript (1.84%)
Shell (0.04%)
Total Downloads
2,521,231
Last Day
1,274
Last Week
41,249
Last Month
177,136
Last Year
1,854,514
MIT License
11,066 Stars
4,844 Commits
1,294 Forks
112 Watchers
12 Branches
355 Contributors
Updated on Jun 30, 2025
Minified
Minified + Gzipped
Latest Version
4.15.1
Package Id
@vee-validate/yup@4.15.1
Unpacked Size
24.23 kB
Size
5.35 kB
File Count
8
NPM Version
10.9.2
Node Version
22.16.0
Published on
Jun 07, 2025
Cumulative downloads
Total Downloads
2
1
Official vee-validate integration with Yup schema validation
You can use yup as a typed schema with the @vee-validate/yup
package:
1# npm 2npm install @vee-validate/yup 3# yarn 4yarn add @vee-validate/yup 5# pnpm 6pnpm add @vee-validate/yup
The @vee-valdiate/yup
package exposes a toTypedSchema
function that accepts any yup 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 'yup';
3import { toTypedSchema } from '@vee-validate/yup';
4
5const { values, handleSubmit } = useForm({
6 validationSchema: toTypedSchema(
7 object({
8 email: string().required(),
9 password: string().required(),
10 name: string(),
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 schema directly and it will be picked up by the form:
1import { useForm } from 'vee-validate'; 2import { object, string } from 'yup'; 3import { toTypedSchema } from '@vee-validate/yup'; 4 5const { values, handleSubmit } = useForm({ 6 validationSchema: toTypedSchema( 7 object({ 8 email: string().required().default('something@email.com'), 9 password: string().required().default(''), 10 name: string().default(''), 11 }) 12 ), 13});
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 transforms to cast your fields before submission:
1import { useForm } from 'vee-validate'; 2import { object, number } from 'yup'; 3import { toTypedSchema } from '@vee-validate/yup'; 4 5const { values, handleSubmit } = useForm({ 6 validationSchema: toTypedSchema( 7 object({ 8 age: number() 9 .transform(val => Number(val)) 10 .required(), 11 }) 12 ), 13});
But note that this does not change the input or output types of the casted fields. The cast will only occur when setting the initial value and when the values are submitted.
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
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
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-23
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 MoreLast Day
-12.9%
1,274
Compared to previous day
Last Week
-8.5%
41,249
Compared to previous week
Last Month
2.2%
177,136
Compared to previous month
Last Year
184%
1,854,514
Compared to previous year