nv

nuxt-validate

Simple Nuxt input validation module using vee-validate

Showing:

Popularity

Downloads/wk

3K

GitHub Stars

113

Maintenance

Last Commit

2yrs ago

Contributors

4

Package

Dependencies

1

Size (min+gzip)

1.0KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Nuxt Validate

Downloads Version License

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.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100