@vee-validate/nuxt
@vee-validate/nuxt
Official vee-validate Nuxt module
Official vee-validate's Nuxt module
Features
- Auto import of vee-validate components
- Auto import of vee-validate composables
- Detecting if you are using
zodoryupand exposing thetoTypedSchemasuitable for either.
Getting Started
In your nuxt project install the vee-validate nuxt module:
# npm
npm i @vee-validate/nuxt
# pnpm
pnpm add @vee-validate/nuxt
# yarn
yarn add @vee-validate/nuxt
Then add the module to your modules config in nuxt.config.ts:
export default defineNuxtConfig({
// ...
modules: [
//...
'@vee-validate/nuxt',
],
});
Types
No types are exposed by default to avoid having conflicts with other libraries, aside from vee-validate's main API components/composables. You can still import them via vee-validate.
Configuration
You can configure a few aspects of the @vee-validate/nuxt module. Here is the config interface:
export default defineNuxtConfig({
// ...
modules: [
//...
[
'@vee-validate/nuxt',
{
// disable or enable auto imports
autoImports: true,
// Use different names for components
componentNames: {
Form: 'VeeForm',
Field: 'VeeField',
FieldArray: 'VeeFieldArray',
ErrorMessage: 'VeeErrorMessage',
},
},
],
],
});
You can also use the veeValidate config key instead of the array syntax:
export default defineNuxtConfig({
// ...
modules: [
//...
'@vee-validate/nuxt',
],
veeValidate: {
// disable or enable auto imports
autoImports: true,
// Use different names for components
componentNames: {
Form: 'VeeForm',
Field: 'VeeField',
FieldArray: 'VeeFieldArray',
ErrorMessage: 'VeeErrorMessage',
},
},
});
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 4.15.1 | MIT | |
| 4.15.0 | MIT | |
| 4.14.7 | MIT | |
| 4.14.6 | MIT | |
| 4.14.5 | MIT | |
| 4.14.4 | MIT | |
| 4.14.3 | MIT | |
| 4.14.2 | MIT | |
| 4.14.1 | MIT | |
| 4.14.0 | MIT | |
| 4.13.2 | MIT | |
| 4.13.1 | MIT | |
| 4.13.0 | MIT | |
| 4.12.8 | MIT | |
| 4.12.7 | MIT | |
| 4.12.6 | MIT | |
| 4.12.5 | MIT | |
| 4.12.4 | MIT | |
| 4.12.3 | MIT | |
| 4.12.2 | MIT | |
| 4.12.1 | MIT | |
| 4.12.0 | MIT | |
| 4.11.8 | MIT | |
| 4.11.7 | MIT | |
| 4.11.6 | MIT | |
| 4.11.5 | MIT | |
| 4.11.4 | MIT | |
| 4.11.3 | MIT | |
| 4.11.2 | MIT | |
| 4.11.1 | MIT |
Showing the latest 30 of 49. See every release on npm
Pre-releases (4)
| Version | Released | License |
|---|---|---|
| 5.0.0-beta.1 | MIT | |
| 5.0.0-beta.0 | MIT | |
| 4.12.0-alpha.1 | MIT | |
| 4.12.0-alpha.0 | MIT |