4.12.8 • Published 12 days ago

@vee-validate/nuxt v4.12.8

Weekly downloads
-
License
MIT
Repository
github
Last release
12 days ago

@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 zod or yup and exposing the toTypedSchema suitable 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',
    },
  },
});
4.12.8

12 days ago

4.12.7

15 days ago

4.12.6

2 months ago

4.12.5

4 months ago

4.12.4

5 months ago

4.12.3

5 months ago

4.11.8

8 months ago

4.10.9

10 months ago

4.11.4

8 months ago

4.10.5

11 months ago

4.11.5

8 months ago

4.10.6

11 months ago

4.11.6

8 months ago

4.10.7

10 months ago

4.11.7

8 months ago

4.10.8

10 months ago

4.12.0-alpha.1

7 months ago

4.12.0-alpha.0

7 months ago

4.11.0

10 months ago

4.12.0

6 months ago

4.11.1

10 months ago

4.12.1

6 months ago

4.11.2

9 months ago

4.12.2

6 months ago

4.11.3

9 months ago

4.10.4

11 months ago

4.10.3

11 months ago

4.9.4

1 year ago

4.9.6

12 months ago

4.9.5

1 year ago

4.10.1

11 months ago

4.10.2

11 months ago

4.10.0

11 months ago

4.9.3

1 year ago

4.9.2

1 year ago

4.9.1

1 year ago

4.9.0

1 year ago

4.8.6

1 year ago