From 072f88866200ab02f1c7e0bf3f0094f2c449413d Mon Sep 17 00:00:00 2001 From: dmcbrn <40859618+dmcbrn@users.noreply.github.com> Date: Wed, 17 Jul 2019 13:43:31 +0200 Subject: [PATCH] implementing response from laravel properly For me, this was the way to go as the `err.response.data` only contained the array with errors and in the code you require it to be wrapped in `errors`. I'm using Laravel v5.8.17. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 66e3375..87fc9db 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ In Vue classes: axios.post('/example', data).then(res => { }).catch(err => { - this.$setLaravelValidationErrorsFromResponse(err.response.data); + this.$setLaravelValidationErrorsFromResponse({ errors: err.response.data }); }); } }