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....
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.
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.
client side validation is used to give normal user feedback if validation fails but you want also server side validation before pushing the data to database etc since client side isnt to be trusted as its easyer to modify and pass the validation if you would want to do that
@@WebDevNiko I wonder, why we can't just make a validation on the server side, and then if validation failed return all error messages to client and give the user feedback?
@@eSeMGie you could do that but having extra validation on client side prevents sending unnecessary requests to server side, eg every time user forget to type last name you wont send request to server. Basically its just more efficent to have validation both on client and server side especially with zod since u can reuse the schema easyly so its effortless
I actually love how snappy it is, to the point You can reduce speed and I sometimes rewind and/or pause when I feel I need a better look at a particular part of the video
This is so amazing!!! This is much easier than React Hook Form + Zod! Thanks
React hook form has its own advantages
Easier, but not better.
@@_ilearn If it is easier, then it is better.
Exceptionally well explained. Great video!
Fantastic video and all your content!
love your videos, please make more!
thanks
looking for a zod tutorial now
very clean explanation, thank you somuch
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....
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.
Excellent!
love you bro!!
Thank you ☺☺
Thanks
Can I use React hook form with Zod?
or should using only 1way?
Thank you sir
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.
client side validation is used to give normal user feedback if validation fails but you want also server side validation before pushing the data to database etc since client side isnt to be trusted as its easyer to modify and pass the validation if you would want to do that
@@WebDevNiko Big thanks for clarification!
@@WebDevNiko I wonder, why we can't just make a validation on the server side, and then if validation failed return all error messages to client and give the user feedback?
@@eSeMGie you could do that but having extra validation on client side prevents sending unnecessary requests to server side, eg every time user forget to type last name you wont send request to server. Basically its just more efficent to have validation both on client and server side especially with zod since u can reuse the schema easyly so its effortless
cool
Well the only problem with zod is that it makes large scale apps significantly slower. Other than that, yea it is great for sure.
Try my library too, multiform-validator
if you could please would you share the code
you got great videos, but it is so hard to follow you as you speak too fast. thx
you can reduce the video speed if it too fast for you
I actually love how snappy it is, to the point
You can reduce speed and I sometimes rewind and/or pause when I feel I need a better look at a particular part of the video