Skip to content

Commit 8f0a18c

Browse files
committed
fix: note on schema behavior
1 parent 17a5272 commit 8f0a18c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

docs/src/pages/guide/migration.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,23 @@ order: 10
77

88
# Migrating from v4 to v5
99

10-
vee-validate v5 is a major release yet it does not introduce any breaking changes except when it comes to validation schemas. This is because vee-validate v5 now supports [standard schema](https://standardschema.dev/) libraries like zod, valibot, yup, and more.
10+
vee-validate v5 is a major release that brings support to [standard schema](https://standardschema.dev/) libraries like zod, valibot, yup, and more.
1111

1212
This means most of the companion packages like `@vee-validate/zod`, `@vee-validate/yup`, `@vee-validate/valibot` are no longer needed and are now deprecated.
1313

1414
## Changes to Nuxt Module
1515

1616
The nuxt module won't suggest installing any packages anymore since most providers that were supported in v4 are now supported in v5 via standard schema API.
1717

18+
## Changes to schema behavior
19+
20+
Since vee-validate v5 is considered schema agnostic, you lose some features that were previously possible with each dedicated validation provider.
21+
22+
- Resolving `required` meta flag is no longer supported from schemas.
23+
- Using defaults to initialize the form values is no longer supported from schemas.
24+
25+
While these features are critical to many apps, the standard schema spec does not provide a way to do that at the moment. Alternatives are being considered via external packages at the moment.
26+
1827
## Replace Typed Schema calls
1928

2029
Typed schemas were a way for vee-validate v4 to support a common interface for multiple validation providers. However, there is a community driven package called [standard schema](https://standardschema.dev/) that provides a common interface for multiple validation providers that is becoming very popular and is already supported by the most popular validation providers.

0 commit comments

Comments
 (0)