Validate Data With Zod in Server Actions Next.js (Client-Side + Server-Side)

preview_player
Показать описание
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship).

👉 Discord: all my courses have a private Discord where I actively participate

⏱️ Timestamps:
0:00 Solution

#webdevelopment #programming #coding
Рекомендации по теме
Комментарии
Автор

Exceptionally well explained. Great video!

snivels
Автор

This is so amazing!!! This is much easier than React Hook Form + Zod! Thanks

meka
Автор

very clean explanation, thank you somuch

aymenbachiri-yhhd
Автор

thanks
looking for a zod tutorial now

psyferinc.
Автор

Question: do you think the revalidation of the mutated data should be decoupled from the server action? that is, i notice that revalidatePath("/todos") is inside the server action....which means it couples the path to the server action....

wingy
Автор

Hi, this is a nice video, however, when using actions (on not the onSubmit prop of the form), the client side validation is not triggerring at all. Only the server side validation is displayed.

jeromealtariba
Автор

Can I use React hook form with Zod?
or should using only 1way?

lrnngman
Автор

Try my library too, multiform-validator

GabrielLogan
Автор

Great wideo! That's exactly what I was looking for. I have a question though. Why do we need validation on the client and server side? It seems to be redundant. Is any possible way to pass validation one the client side and fail validation one the server side? We actually passed already validated data to the server.

eSeMGie
Автор

Well the only problem with zod is that it makes large scale apps significantly slower. Other than that, yea it is great for sure.

swdotdev
Автор

you got great videos, but it is so hard to follow you as you speak too fast. thx

xqpibuy