4.15.0 • Published 6 months ago

@vee-validate/nuxt v4.15.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months 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.15.0

6 months ago

4.14.7

7 months ago

4.14.5

8 months ago

4.14.6

8 months ago

4.14.4

8 months ago

4.14.1

8 months ago

4.14.2

8 months ago

4.14.3

8 months ago

4.14.0

8 months ago

4.13.2

11 months ago

4.13.1

1 year ago

4.13.0

1 year ago

4.12.8

1 year ago

4.12.7

1 year ago

4.12.6

1 year ago

4.12.5

1 year ago

4.12.4

1 year ago

4.12.3

1 year ago

4.11.8

2 years ago

4.10.9

2 years ago

4.11.4

2 years ago

4.10.5

2 years ago

4.11.5

2 years ago

4.10.6

2 years ago

4.11.6

2 years ago

4.10.7

2 years ago

4.11.7

2 years ago

4.10.8

2 years ago

4.12.0-alpha.1

2 years ago

4.12.0-alpha.0

2 years ago

4.11.0

2 years ago

4.12.0

2 years ago

4.11.1

2 years ago

4.12.1

2 years ago

4.11.2

2 years ago

4.12.2

2 years ago

4.11.3

2 years ago

4.10.4

2 years ago

4.10.3

2 years ago

4.9.4

2 years ago

4.9.6

2 years ago

4.9.5

2 years ago

4.10.1

2 years ago

4.10.2

2 years ago

4.10.0

2 years ago

4.9.3

2 years ago

4.9.2

2 years ago

4.9.1

2 years ago

4.9.0

2 years ago

4.8.6

2 years ago