1.0.1 • Published 7 years ago
@iamproperty/vue-errors
Licence
MIT
Version
1.0.1
Deps
0
Size
5 kB
Vulns
0
Weekly
0
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'));