I'm using laravel 9 and Vue 3. I am trying to access laravel validation error in vue. Error message send by laravel.
{message: "The given data was invalid.",…}
errors: {supplyData.supplier_id: ["Please fill the supplier field"]}
supplyData.supplier_id: ["Please fill the supplier field"]
0: "Please fill the supplier field"
message: "The given data was invalid."
I have tried following code to access the error but it didn't work.
<span
v-if="errors['supplyData.supplier_id']"
class="invalid_feedback"
style="display:block; color:red;"
role="alert"
>
{{ errors["supplyData.supplier_id"][0]}}
</span>