I am trying to show the errors of the form, I am doing it with an array and I show them with a for each the problem is that it shows me the error but with brackets and quotes.
mutations.js
createUser(state) {
var url = urlUser
axios.post(url, {
id: state.idUser,
name: state.newUser.name,
email: state.newUser.email,
password: state.newUser.password,
//cant_client: state.newUser.cant_client,
cant_vehicle: state.newUser.cant_vehicle
//url: window.location.host + "/acceso/" + md5(state.newUser.password)
}).then(response => {
state.newUser = {
id: '',
name: '',
email: '',
password: '',
url: ''
}
state.errorsLaravel = []
toastr.success('Usuario generado con éxito')
}).catch(error => {
<!-- here -->
state.errorsLaravel = error.response.data
<!-- here -->
})
},
index.vue
<form action="POST" v-on:submit.prevent="createUser">
<div class="row">
<div class="form-group col-lg-3">
<label for="name">Nombre</label>
<input v-validate="'required|min:4|max:190'"
:class="{'input': true, 'is-invalid': errors.has('name') }"
type="text"
name="name"
class="form-control" v-model="newUser.name">
<div v-for="(error, index) in errorsLaravel" class="text-danger" :key="index">
<p>{{ error.name }}</p>
</div>
</div>
<div class="col-lg-3 mt-2">
<label></label>
<button type="submit" class="btn btn-success form-control"><i class="fas fa-plus-square"></i> Guardar</button>
</div>
</div>
</form>
show me this way, please your help thanks

