Video yükleniyor...
Video Yüklenemedi
Form validation is hard. What if there was a Next.js form lib that does both client and server validation from one Zod schema 👀
145,943 görüntüleme • 2 yıl önce •via X (Twitter)
8 Yorum

Bilal2 yıl önce
I like the react-hook-form flow Shadcn uses. Just the client though which I think is fine.

Fredkisss is on 🦋 blue sky 🦋2 yıl önce
This resembles the new tanstack form, pretty sure it works on both environments exactly like that cc @crutchcorn

Danny Guerin2 yıl önce
I guess I'm just the weird person that really, genuinely loves writing form validation from scratch. Like, it is fun to me. Please give me more forms to validate.

Christoph2 yıl önce
What if you need the check the db in the validation for the server only? For example to check if the selected user exists when sending the id

Michał Miszczyszyn @ yournextstore.com2 yıl önce
There is such library: it's called next-safe-action!

Fabian Hiller2 yıl önce
🙌

Isaiah Marc Sanchez2 yıl önce
I do this with tRPC, React Hook Form and Zod

Abhinav Bhar2 yıl önce
You can just make it a npm package and do it
