validation from Laravel to VueJS.
I need to show the right error messages to the right input field. Any one have an idea?
form.vue :
<tr v-for="(item, index) in form.items">
<td>
<input type="text" v-model="item.name" class="form-control">
<small class="text-danger" v-if="errors.name">
{{errors.name[0]}}</small>
</td>
<input type="text" v-model="item.age" class="form-control">
<small class="text-danger" v-if="errors.age">
{{errors.age[0]}}</small>
</td>
</tr>
Controller :
$this->validate($request, [
'items.*.name' => 'required',
'items.*.age' => 'required',
]);
I got this in my vue devtools
