'How to access laravel validation error in Vue.js?

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>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source