Level 102
Try this (optional chaining)
v-if="form.errors.user?.name?.first"
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I'm trying to use Inertia useForm validation but I get error on because it's trying to read the object when it's empty. Any idea why this is happening? I'm looking for the error like this:
<small
v-if="form.errors.user.name.first"
v-text="form.errors.user.name.first"
class="text-red-600"
></small>
Try this (optional chaining)
v-if="form.errors.user?.name?.first"
Please or to participate in this conversation.