Skip to content

Share Laravel validation error messages with Vue

License

Notifications You must be signed in to change notification settings

iamproperty/vue-errors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Share Laravel validation error messages with Vue

Resources

License

Stars

Watchers

Forks

Packages

No packages published