Example usage:
In your forms: Note: You need to add the formValidation.js as a mixin to your component.
{{ collectErr('email') }}
In your module files of vuex you need to commit the FORM_ERROR type. async STORE_ARTICLE({dispatch,commit}, data) { try { const response = await article.store(data).then((response) => { commit(STORE_ARTICLE, response.data.data) commit(SUCCESS, response.data.meta.msg) }) } catch(err) { if(err.response.status == 422) { commit(FORM_ERROR, err.response.data) //IMPORTANT! } } },