#My validation error is not being show,
1 messages · Page 1 of 1 (latest)
Don't think const { errors } = usePage().props; would be reactive, so whenever the errors are updated, that value wouldn't be updated
Any reason you're not just using the form helper? That would include reactivity on the errors
@silk berry do you maybe know an alternative to the errors const?
And according to the information i’ve looked up, the form helpers only work with client side rendering so because the error is sent through server side i can’t use the form helpers.
Eh no, that's not how Inertia's SSR works. Essentially nothing happens server-side with Inertia, SSR is just a pre-rendered intial page, then afterwards it's just Inertia
Hmm then everything i understand so far is wrong, ill check into that.
Do you maybe have an example of how you would do it?
Alright ill try that out again, ty
Hello @tawny plume , why don't you use laravel precognition (https://laravel.com/docs/11.x/precognition#using-react-and-inertia) instead of hook form with zod resolver ?
This allows you to avoid having to define the validation rules twice
This looks very interesting, ill try this one out and let you know when i get to the office
Btw i will implement this but after i fix my problem..
still couldnt figure it out.
and i know about https://inertiajs.com/shared-data#flash-messages but i found a laravel source on github which is doing it without and its working there.
i just dont understand why not for me.
I even used his component as test
I do not have access to your code, so I can't help you on your error 😅
I fixed the problem.
I created a new project and copied al my files. So yes everything is the same but its working now.
If you are still facing the issue, try changing the session storage from cookies to files or another option. @tawny plume