Vuelidate improver

Vuelidate improver

Version: 1.2.3 Updated: 07/21/2020

By: atnrpro License: ISC

Downloads Last 30 Days: 473

vuelidate-improver

dependencies Status

Demo

Example

Installation

  npm i --save vuelidate-improver
  yarn add vuelidate-improver

You can import the library and use as a Vue plugin to enable the functionality globally on all components containing validation configuration.

import Vue from 'vue'
import VuelidateImprover from 'vuelidate-improver'
import Vuelidate from 'vuelidate'
Vue.use(VuelidateImprover);
Vue.use(Vuelidate)

Alternatively it is possible to import a mixin directly to components in which it will be used.

import { validationMixin } from 'vuelidate'
import { validationImproverMixin } from 'vuelidate-improver'

var Component = Vue.extend({
  mixins: [validationImproverMixin, validationMixin],
  validations: { ... }
})
Categories: Vue js