0👍
You will always check for the first row, because of if (this.rows[0]...)
rows[0]
will always take the first object in your array
If you always want to validate all the rows, you could check if there are any rows without a supplier id: if (this.rows.filter((row) => row.supplier_id1 === "").length)
- [Vuejs]-I want to change the class of my div on text change using vuejs
- [Vuejs]-Vue: How to pass custom props and router props?
0👍
I not sure which toast component did you used, but i can do similar mock for your validation message + databinding of your {{row.supplier_id1}}
v-model
value of input[type="date]
will only valid when you inputted date correctly so this.rows[0].supplier_id1.length == 0
to validate is fine. The reactivity is working fine.
My Working Fiddle: https://jsfiddle.net/bu9twps2/
UPDATE: Your original condition to validate works fine as well, problem likely lies at your toast
- [Vuejs]-Want to update array values in vuejs using laravel
- [Vuejs]-Grouping HTML elements in vuejs using v-for