Hi there, I want to use Inertia with Vue. Let's say I have a form, where I can add persons to the DB. I also have a button that allowes you to add multiple persons at once.
I know how to send the data to Laravel via Inertia and I know how to validate arrays. But for example I add some Persons and I click on 'Add new person' and leave all that person's fields empty. How do I ignore that or multiple left empty ones? ```js
<template>
<div>
<form @submit.prevent="handleSubmit">
<div v-for="(person, index) in people" :key="index">
<label>Name:</label>
<input type="text" v-model="person.name">
<label>Email:</label>
<input type="email" v-model="person.email">
</div>
<button @click.prevent="addPerson">Add Person</button>
<button type="submit">Submit</button>
</form>
</div>
</template>
<script setup>
import { ref } from 'vue';
const people = ref([{ name: '', email: '' }]);
const addPerson = () => {
people.value.push({ name: '', email: '' });
};
const handleSubmit = () => {
// Handle form submission, access the data in people array
console.log(people.value);
};
</script>```