@iamproperty/vue-errors

1.0.1 • Public • Published

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'));

/@iamproperty/vue-errors/

    Package Sidebar

    Install

    npm i @iamproperty/vue-errors

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.09 kB

    Total Files

    8

    Last publish

    Collaborators

    • iap-mwhitedev
    • jamesfenwick
    • maharrington
    • jameslambert1986