Answer the question
In order to leave comments, you need to log in
How to display (handle) errors in vue.js that came from the laravel validator?
Good afternoon, tell me how to correctly display validator errors in vue.js in the notify plugin.
.catch(error => {
this.$q.loading.hide()
this.$q.notify({
color: 'red-4',
textColor: 'white',
message: 'Ошибка'
})
})
Answer the question
In order to leave comments, you need to log in
.catch((error) => {
let errors = error.response.data.errors;
for (let variable in errors) {
this.$notify({
type: 'error',
title: errors[variable][0],
});
continue;
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question