nuxt-validate

Simple Nuxt input validation module using vee-validate
50,019 119
Install
npm install nuxt-validate
Latest Version:1.0.1
License:MIT
Last Updated:Jan 8, 2024
Links: GitHub  ·  npm
Maintainer: lewyuburi

Nuxt Validate

Nuxt.js module for validations using Vee-Validate

Install

npm i --save nuxt-validate

Usage

Add module to nuxt.config.js

module.exports = {
  modules: [
    ...
    ['nuxt-validate', {
      lang: 'es',
      nuxti18n: {
        locale: {
          'zh-CN': 'zh_CN'
        }
      }
      ...
      // regular vee-validate options
    }]
  ]
}

Configuration

lang
  • Default: en

The lang option accepts the name file placed on the locale dir of Vee-Validate repository without the extension.

nuxti18n
  • Default: undefined

When nuxti18n option is set as a true, Vee-Validate's locale changes with nuxt-i18n's locale.
If nuxt-i18n's locale and Vee-Validate's locale are different, set locale object to convert locale code.

nuxti18n: {
  locale: {
    // nuxt-i18n's locale: Vee-Validate's locale
    'zh-cn': 'zh_CN',
    'zh-tw': 'zh_TW'
  }
}

notice: If you use nuxt-i18n module, declare the nuxt-validate module at before it.

Documentation

Read the official Vee-Validate documentation and demos.

Related Packages

@mole-inc/nuxt-validate

Simple Nuxt input validation module using vee-validate

20,013 4
nuxt-define

One utility function for module authors to define compiler constants for all bui...

13,412,511
@nuxtjs/html-validator

html-validate integration for Nuxt

852,329 203
@lg2/nuxt3-module-create-dato-map

nuxt3-module-create-dato-map

2,869 0
nuxt-csurf

Nuxt Cross-Site Request Forgery (CSRF) Prevention

6,263,746 91

Version History

Version Released License
1.0.1 MIT
1.0.0 MIT
0.1.3 MIT
0.1.2 MIT
0.1.1 MIT