All Projects → lewyuburi → Nuxt Validate

lewyuburi / Nuxt Validate

Licence: mit
Simple Nuxt input validation module using vee-validate

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Nuxt Validate

Vue Masonry Wall
A pure vue responsive masonry layout without direct dom manipulation and ssr support.
Stars: ✭ 79 (-26.17%)
Mutual labels:  nuxtjs
Validator Collection
Python library of 60+ commonly-used validator functions
Stars: ✭ 91 (-14.95%)
Mutual labels:  validation-library
Nuxt User Agent
Nuxt.js module for handling User-Agent.
Stars: ✭ 102 (-4.67%)
Mutual labels:  nuxtjs
Nuxt Social Meta
Nuxt.js module generate meta-tags for social networks - Facebook, Twitter and LinkedIn (and the rest uses OG tags, such as Discord etc.).
Stars: ✭ 82 (-23.36%)
Mutual labels:  nuxtjs
Example Ecommerce Snipcart Vue
The Transglobal Candy Store: Sample front-end for the Sanity.io e-commerce schema with vue.js, nuxt.js, and snipcart
Stars: ✭ 89 (-16.82%)
Mutual labels:  nuxtjs
Sails Nuxt
Sails + Nuxt + Vuetify Combo <3
Stars: ✭ 92 (-14.02%)
Mutual labels:  nuxtjs
Vue Horizontal
An ultra simple pure vue horizontal layout for modern responsive web with zero dependencies. (SPA/SSG/SSR)
Stars: ✭ 75 (-29.91%)
Mutual labels:  nuxtjs
Lichter.io
My own website and CV
Stars: ✭ 105 (-1.87%)
Mutual labels:  nuxtjs
Fluidvalidator
General purpose validation system for objects, nested objects, enumerables written in Swift
Stars: ✭ 89 (-16.82%)
Mutual labels:  validation-library
Nuxtjs Multilanguage Website
Nuxtjs Multilanguage Website
Stars: ✭ 100 (-6.54%)
Mutual labels:  nuxtjs
Nuxt Graphql Request
Easy Minimal GraphQL client integration with Nuxt.js.
Stars: ✭ 85 (-20.56%)
Mutual labels:  nuxtjs
Vest
Vest ✅ Declarative validations framework
Stars: ✭ 1,271 (+1087.85%)
Mutual labels:  validation-library
Nuxt Netlify
Dynamically generate `_headers` and `_redirects` files for Netlify in your Nuxt.js projects
Stars: ✭ 97 (-9.35%)
Mutual labels:  nuxtjs
Vue Music Website
Music website built with Vue.js and Cosmic JS
Stars: ✭ 80 (-25.23%)
Mutual labels:  nuxtjs
Nuxt Firebase Pwa
Run the Nuxt.js application (SPA * SSR * PWA) on Firebase.
Stars: ✭ 103 (-3.74%)
Mutual labels:  nuxtjs
Nuxt Chat App
Frontend of real-time chat application built using nuxtjs, socket.io. Check the backend at https://github.com/binbytes/chat-app-server.
Stars: ✭ 77 (-28.04%)
Mutual labels:  nuxtjs
Validates formatting of
Common Rails validations wrapped in a gem.
Stars: ✭ 91 (-14.95%)
Mutual labels:  validation-library
Google Gtag Module
Enable google gtagjs for NuxtJs
Stars: ✭ 106 (-0.93%)
Mutual labels:  nuxtjs
Vue Svg Inline Loader
Webpack loader used for inline replacement of SVG images with actual content of SVG files in Vue projects.
Stars: ✭ 105 (-1.87%)
Mutual labels:  nuxtjs
Vue Family Bucket Ssr Koa2 Full Stack Development From Meituan
🚀🚀2020最新Vue全家桶+SSR+Koa2全栈开发☁
Stars: ✭ 100 (-6.54%)
Mutual labels:  nuxtjs

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
      // https://github.com/logaretm/vee-validate/blob/master/docs/configuration.md
    }]
  ]
}

Using top level options

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

Configuration

lang

  • Default: undefined

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

rules

  • Default: undefined

If undefined, importing all rules. When listed from validation-rules, importing it.

nuxti18n: {
  rules: ['alpha_dash', 'min']
}

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.

FAQ

How to add custom validation methods?

We recommend using plugins.

nuxt.config.js

module.exports = {
  plugins: ["~plugins/validate.js"],
}

plugins/validate.js

import { extend } from "vee-validate";

extend("my-validation", {
  message: "This {_field_} is invalid.",
  validate: value => {
    // ...
    return true;
  }
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].