1.0.1 • Published 5 years ago

@iamproperty/vue-errors v1.0.1

Weekly downloads
3
License
MIT
Repository
-
Last release
5 years ago

Vue Errors

Use Laravel validation error messages in Vue.

Usage

Install the package using yarn or npm.

yarn add @iamproperty/vue-errors

When setting up your Vuex store add the module as a top level module

import Vuex from 'vuex';
import { errors } from '@iamproperty/vue-errors';

export default new Vuex.Store({
  modules: {
    errors,
  }
})

and register the plugin.

import Vue from 'vue';
import Errors from '@iamproperty/vue-errors';

Vue.use(Errors);

If you register the store module to a different name you can use the installer function to register the plugin to the custom location.

import Vue from 'vue';
import { installer } from '@iamproperty/vue-errors';

Vue.use(installer('custom/namespace'));