I would love to see a full tutorial on Zod! Also, an overview on your thoughts of the T3 stack.
@arno.claude2 жыл бұрын
I second this
@zapfska73902 жыл бұрын
I third the t3 stack
@athulgeorge67442 жыл бұрын
I 4th the T3 stack
@nisargbhatt3002 жыл бұрын
I 6th this with Async validation with Zod (like unique username).
@alexchang63672 жыл бұрын
i 7th love to see this
@papadavis472 жыл бұрын
Well done, Kyle. I have heard of zod, but I have not used it yet. I appreciate this concise video of what it is. A full tutorial with a React Typescript project would be great. Thanks for your work!
@boian-inavov2 жыл бұрын
I love how Zod has picked up popularity lately. I’ve been using it it for a while and it’s been amazing! You just forget about the cumbersome validation part and focus on building your business logic. Also the way it’ll give you a ready made object in the way you’d been expecting it is just god sent! Glad that more people are covering it 👏
@BinaryReader2 жыл бұрын
Zod is no different to Yup, in fact, Zod is basically a clone of Yup with better static typing. Also, Zod is incredibly slow. Compare it to industry standard validators and it's like 300x slower to validate anything. You shouldn't be using Zod on the server side (it's that bad) The hype around Zod is real, but that doesn't make it good. It's just social media marketing and online influencers pushing it.
@TheMasterofCommentАй бұрын
@@BinaryReaderwhy's it so slow? Im familiar with Yup, from what. I know Zod is even faster?
@abdirahmann2 жыл бұрын
OMG OMG OMG OMG please do a full tutorial on this one, this is going to simplify my data validation logic on my node server, i also just migrated everything to ts yesterday, how awesome, also, i checked out express-validator and i didn't like how it did validation using middlewares and stuff soo this is a GOD send. Thanks GOD and thanks to you too for letting us know. love ya :)
@codeNameMoose9072 жыл бұрын
Awesome! I never heard of Zod! But more importantly... hope you feel much better soon Kyle! Your followers will be here waiting; we won't ever leave you. Thanks for everything you do! Sending you and yours super healthy and happy healing vibes, Buddy! 😊
@arunavabanerjee61032 жыл бұрын
Hey Kyle, thanks for the video, zod seems super cool and I'd really like if could make a tutorial on it
@mikehill11142 жыл бұрын
I'm glad you said "comments below." I'm a full stack developer, but it wasn't until just now that I figured out where the KZbin comments were located ;)
@remccs162 жыл бұрын
This is great, thank you Kyle! I would most certainly watch a full tutorial on Zod!
@MrSwingbop2 жыл бұрын
Full Tutorial is always welcome :D Thanks for all the precious tips!
@anatolydyatlov9632 жыл бұрын
Yep, I've been using it for the past few months and it's a must-have for schemaless dbs.
@jayliu5432 Жыл бұрын
Showing the form use case for Zod was super helpful. I finally get it!
@LasgCe2 жыл бұрын
I remember watching the video 2 days ago and thinking, why would I ever need this .. Well, today I needed to create a very complex form validation and I gotta say, Zod is doing a great job so far
@samuelwittlinger77902 жыл бұрын
Looks pretty good, personally I created a validator based on Joi which returns the object you are validating typecasted as the object type your validation schema is describing, which is a little more convenient than having to call infer every time.
@souvlaki422 жыл бұрын
Very cool library. I really like the idea of a tutorial about it.
@fotoflo2 жыл бұрын
Thank you for this great video! Wanted to note that Zod also offers a little bit of API around error messages as well.
@ReconNite2 жыл бұрын
The problem I ran into with zod was that, not only was it super slow compared to other validators it was also very limiting as to what could be checked, or what could be coerced from one value to another. Although I still use it on some projects, I started to move over to superstruct for my more recent projects as it allows me to define custom refinements/coercions/types with little trouble. Of course this means that you lose the "built-in" or modular aspect of zod, superstruct makes it a lot easier for targeted validation.
@BinaryReader2 жыл бұрын
Try TypeBox, it's based on industry standards and it's also 300x faster than Zod.
@tsioryfitiavanaanhykrishna69922 жыл бұрын
Aw longtime no see, I'm glad that u reach 1M sub ! Thanks for all your tutorials and keep up the good works !
@dancewithakshara092 жыл бұрын
That would be wonderful 👍 please do a full tutorial. As your tutorials are small and feature packed.
@shivamsahil36602 жыл бұрын
Hmm this seems more of a form validation library rather than improvement on typescript. Thanks a lot Kyle ❤️
@oleksandrluchytskyi68672 жыл бұрын
Yes, please a video with most common recipes will be good to have 🤩
@zhenglaowang84892 жыл бұрын
I can't get over how clean your hair looks.
@sohanbafna22822 жыл бұрын
I am using NestJs heavily for most of my codebase I define DTO's and nest js frameworks helps me to validate each of objects/types for request I make. In that case i would not need this Before that we have been using JSON schema validators where we define schema and validate the DTO's But now zod is permutation and combination of all - like even loash functions are wrapped, this is super useful and must give a try Thanks for quick overview
@nmanikiran2 жыл бұрын
would love to see a full tutorial on Zod! And also please compare with Joi, ajv, zod
@BinaryReader2 жыл бұрын
Comparing Zod to Ajv would be embarrassing....for Zod >_>
@_the_one_12 жыл бұрын
You must be kidding! I was just trying to get deep with Zod and you posted a video! Great timing, thanks. I believe "everyone" would LOVE a full tutorial about Zod and why not... typing APIs both with static typing and validating the actual response
@allirey61962 жыл бұрын
it's very interesting not just for frontend form validation but also for backend API validation
@arryaz0512 жыл бұрын
Great tool, I use it a lot in NodeJS HTTP APIs to validate requests to the server and get the TypeScript type too.
@johnychinese2 жыл бұрын
Yep Kyle, We want a full tutorial, I love how you simplify these things but still show how valuable and powerful they are
@mind_of_a_darkhorse2 жыл бұрын
I am intrigued! So, please make a tutorial on this game-changing way of doing things!
@RandomActsOfWil2 жыл бұрын
FULL TUTORIAL PLEASE!!!!! You are awesome!!!!
@sujoydutta9202 жыл бұрын
That would be really great to have a tutorial on Zod
@ElliottTheUnicorn Жыл бұрын
thanks for the brief explanation. exactly what i was looking for 👍
@blockstarter4745 Жыл бұрын
Always great content chief (Y) . . . Keep it up
@aram5642 Жыл бұрын
Zod in a plain vanilla JS/TS project is definitely a win. No question about it. Would be interesting so see a video on how it integrates with framework like Angular and its built-in form validators.
@dhaivathlal48702 жыл бұрын
I'm about to do my first typescript form validation without any framework hence no framework provided form validation methods. This video just dropped right on time
@adisonmasih2 жыл бұрын
We really need a full tutorial! 🔥
@arian51262 жыл бұрын
Great, exactly what I needed in the right time for a React project but for someone who's worked with Angular FormBuilder (which is a built-in module), you'd know how Angular is underrated.
@AmanSingh-px5if2 жыл бұрын
and exactly why react is so popular, not every project will need all the built in modules or even of the type that are baked in.
@arian51262 жыл бұрын
@@AmanSingh-px5if you don't have to use all built-in modules. The compiler removes unused modules from the bundle.
@jawadshaikh17452 жыл бұрын
definitely would love to have a full tut on Zod
@martinpenev67502 жыл бұрын
Hi Kyle Thx for showing us Zod, I really think it’s supercool! I was wondering: Which validation library have you been using before Zod?
@tonyg_nerd2 жыл бұрын
Kyle, thanks for this. I'm tooling up for projects with React, MUI, Redux, and have been looking into Formik which validates (primarily) with Yup. I'm not loving the Formik/Yup side, so it'll be nice to give Zod a spin, especially since it's TS-first, as am I. As someone else noted, my primary questions will be about custom rules, field/field comparisons, and async/sync server validations. Zod MUST perform here or I need to go with an established standard.
@tonyg_nerd2 жыл бұрын
Looks like Zod is the winner with Hook Forms.
@jtnovellis2 жыл бұрын
Yeah. I’d love to watch the full tutorial!
@rand0mtv6602 жыл бұрын
Yeah Zod is cool, but it also kinda depends what you are doing IMO. If you use Zod to validate endpoints that you create with tRPC, then it seems to be great. If you use it for validating forms on frontend with react-hook-form, then yup might just be slightly better. That's at least from my personal experience comparing these two. yup also has a nice Typescript experience and the infer type from schema like the z.infer you shown here. Zod isn't the first schema validation library to utilize Typescript, but it seems people act like it is :)
@odisclemons97002 жыл бұрын
If you truly love Zod then KNEEL before Zod. Note: I'm 100% sure no one on the internet thought to make that exact same joke
@eschwinvanloon78262 жыл бұрын
Hey Kyle, Thank you for this video, i'd love to see a full tutorial on Zod!
@ColinRichardson2 жыл бұрын
The problem I found with Zod is the transforms. It starts to blur the edges between validating and parsing. But my manager found a good library (I don't remember it's name for the top of my head) which uses the TS types and makes it a type validator at compile time, rather than runtime, using vite plugins. It seems like a better suit for us as we already have the types setup, rather than using Zod to Infer the types.
@HienLuongOfficial Жыл бұрын
can you share what library you are using ?
@nabinsaud46882 жыл бұрын
Yes Bring the zod validation video
@MultiPoiu2 жыл бұрын
Erf, i'm sticking to AJV when doing api-first design and reusable component, because jsonSchema, even if it is a bit more tedious, it is reusable in all language, and can serve as first class API doc with swagger (jsonSchema are almost 100% compatible to swagger) And DTO with annotation are more readable for other stuff, I then use class-validator
@nikhilverma49762 жыл бұрын
Makes sense. JSON portability FTW
@pomprocks2 жыл бұрын
You should show it with the same validation messages that your if/else validation has. Often certain messages need to be used, not just whatever messages your validation library produces.
@anthonyribeiro39182 жыл бұрын
I would love to see full tutorial too, your didatics is very good!
@vsabhishek12 жыл бұрын
Thank you, you are awesome👌 in explaining new concepts👏👏. Yes i would love to see you cover a full tutorial on zod using typescript.👍👍
@Jorge787122 жыл бұрын
Great intro to zod thanks!
@anuragpal022 жыл бұрын
Zod is insane, I used it for API response validation, great features.
@johnjohn70232 жыл бұрын
i was waiting for this. thank you so much!!! We want full tutorial!
@twd22 жыл бұрын
thanks ,Kyle a full tutorial would be greate 😍
@jimchapman4579 Жыл бұрын
Yes! Full tutorial please.
@DillonRedding2 жыл бұрын
Super cool! This is like Joi, but specifically for TypeScript.
@MDFAYIZTP2 жыл бұрын
Yup vs Zod , add a comparison in next video ❤ we are waiting
@Zeee5302 жыл бұрын
In my previous project I used typescript, formik and yup for validation but Zod looks far more easier and manageable, I'll appreciate a full tutorial
@danhphamthanh1972 жыл бұрын
I don't think so, Formik still make the form validate way more robust and manageble. Or maybe we can try Formik + Zod :D
@SoldierXfreedom Жыл бұрын
An essential for any API
@nomiscph2 жыл бұрын
In angular they have forms with full typescript support 🎉 for everyone working with angular
@edwardalmanzar83822 жыл бұрын
Full tutorial 🙌
@nickurchin95792 жыл бұрын
At 1:25 ish I paused to read that Introduction off their site and once I read "The goal is to eliminate duplicative type declarations." - it clicked. As I'm on the tail end of the "learning" process, I hate getting comfortable with something (typescript in this case) only for a new/hot library to come along and improve it, because it also means I have yet another damn thing to learn before I feel ready to apply. However, I've actually recently run into that exact issue where I've had to declare the same type in two different places and it just felt gross, but I couldn't see a way around it; now we have Zod and that's awesome.
@nickurchin95792 жыл бұрын
@@kishirisu1268 Shhhh, Typescript can hear you. You're real too, Typescript, we promise (don't worry, it won't resolve).
@avneet122842 жыл бұрын
Cool. Full tutorial would be great
@bouwensr2 жыл бұрын
Love a full tutorial especially with a form generated out of json data and field required based on a ‘complete switch’
@SpaceGravy Жыл бұрын
A comparison with yup would be appreciated!
@focusroom_ Жыл бұрын
Great! want to learn more about this
@JasonLayton Жыл бұрын
Implementing Zod has been one of the worst decisions that my team has made. We all hate it.
@LEDACOFFICIAL11 ай бұрын
why tho 😂
@JasonLayton11 ай бұрын
@@LEDACOFFICIALbetween Zod and react hook forms, they add enormous complexity and rigidity to the code. I also find the debugging experience to be poor.
@al-doori239210 ай бұрын
Same here
@genc_emekli2 жыл бұрын
Hello. please do a full tutorial. I have already started to use zod. Many thanks.
@avinashmahananda8717 Жыл бұрын
Would love to see a full zod tutorial.
@daminipandey6490 Жыл бұрын
Hey. I'm just curious to know if it's possible to chain multiple regex expressions for the same input field and display different error messages .
@daminipandey6490 Жыл бұрын
@@victor_productions Siuuuuuuuuu
@oswaldosoto45002 жыл бұрын
would be nice have a zod tutorial for advanced user/passwords forms.
@FamilyGuyVids112 жыл бұрын
Great stuff. ill try it out
@0xSLN2 жыл бұрын
great! full tutorial plz!!
@chidimbamalu34902 жыл бұрын
Good Video. Make a video on Zod like you did on Prisma
@vizunaldth2 жыл бұрын
Kyle - full tut like you did on prisma would be nice to watch
@josecongo94532 жыл бұрын
Please do a full Tuturial. I have a question, with zod do I still need create Interface(TS) for static checking? How can I reuse zod in multiple component(I thinking i react component). Thank you
@mrcookie972 жыл бұрын
It can check if integer too that's quite nice
@brunocapitelli7754 Жыл бұрын
Awesome vid! Even though Zod is awesome and pragmatical for type validation the only reason I still wouldn't add it to a backend project is that it's not an ORM as well, so using TypeORM is more of a gain even if the whole schema validation is more verbose. For frontend projects I feel like using it is not that worth it since I use Angular and things like FormBuilder along with classes/interfaces pretty much do the job for a frontend scope, leaving the hard validations for the backend as it should be. I can't help but feel like Zod has gained much popularity solely due to React and the culture of recurring to a lot of third-partys for specific objectives.
@j946atFIVEFOUR88AA2 жыл бұрын
Would be cool to see you have a talk with Theo and his T3 stack 🙂
@ivanjezakonful2 жыл бұрын
Full tutorial would be awesome
@FatahChan2 жыл бұрын
Great video as always, can you make a video about PWA
@AndrewDevUA2 жыл бұрын
for simple for it's looks awesome!
@saimrgondal23608 ай бұрын
I'd like a video comparing this with other form validation libs such as Joi. I;ve used Joi in the past and Im really curious to see if zod offers better usability. Thanks. Love your videos.
@naezy3162 жыл бұрын
Waiting for the full tutorial !!!
@pieter5466 Жыл бұрын
Zod looks exactly like every software library should.
@nomadshiba2 жыл бұрын
cool, i had made something similar years ago it was returning correct type after parse also but this is more solid and better than my ancient prototype thingy of course defiantly will use it!
@geforcesong2 жыл бұрын
Waiting for full tutorial ❤
@darkerisbetter86992 жыл бұрын
Based on a quick glance, there seems to be some serious limitations around conditional validation (i.e. range of values for fieldA can be constrained based on another fieldB).
@z-aru2 жыл бұрын
You could use .refine() or .superRefine(), it's amazing stuff
@morticie3332 жыл бұрын
Great, please do the complex tutorial! I am looking forward! :)
@paolocatalano28852 жыл бұрын
Hey Kyle! Please make a full tutorial of Zod including also Zorm (React form with Zod). Thank you!
@0xtz_2 жыл бұрын
Waiting for zod tutorial 👌
@sumanbyravi82272 жыл бұрын
Hey Kyle 🔥
@NewHellz-2 жыл бұрын
hey there, may i ask something ?? Is there possible if to create progress bar, with numered inside can change automatically with the date i want to??
@MrFelipefsf2 жыл бұрын
Thanks Kyle, I would like to watch a tutorial with NodeJs data validation
@tylerarrigoni77002 жыл бұрын
Zod is awesome... combined with tRPC is game changing
@new-anointingaremu35972 жыл бұрын
Finally I don't have to stress on learning regex😌
@theodorealenas31712 жыл бұрын
Well you should learn regex anyway, but most importantly, that's not where regex are meant to be used. Regex are nice for searching. I've used them to extract some URLs from an HTML file, but I wouldn't let them run automatically while I'm not looking.
@deveshrawool60352 жыл бұрын
Could have used some other additional info as to why is it better than other validation schema libraries for instance like Yup.
@valentynlugovyi47892 жыл бұрын
Exectly, it is a lot more useful to comper with Yup! I usually use Yup in my projects, I am used to it, and so far not reason provided to switch to Zod. Now I will have to do my own research to comper them.
@tbcfrankee2 жыл бұрын
Was using yup, ajv, validator... once I looked at Zod, I never turned back!
@alexgochenour8740Ай бұрын
Not to mention not having to write unit tests for validation logic. I used to hate that.
@harshgautam35862 жыл бұрын
can you make a complete typescript REST api tutorial video. Love your content btw.
@MOtherMetroid2 жыл бұрын
Full tutorial please, this sounds very useful.
@codernerd70762 жыл бұрын
It got great documentation just read those, you will never become a web developer if you just look video tutorials.... get out of that tutorial hell install it and try to use it your self!
@MOtherMetroid2 жыл бұрын
@@codernerd7076 Chill, no one said anything about becoming a web dev.
@codernerd70762 жыл бұрын
@@MOtherMetroid so you just look this boring videos for fun?! Anyway if you want make anything your self better start to do things and not count with videos...