News for hackers. Stuff that matters.
Re:Zod 4 by zachrip on Tuesday May 20, 2025 @07:02AM (#44040101)
Zod has nothing to do with SPAs and isn't just a frontend tool. Do you not validate inputs in your code?
Re:Zod 4 by myflash13 on Tuesday May 20, 2025 @07:26AM (#44040278)
Laravel/Livewire handles it. I have no idea why something like Zod should be the concern for a high level application dev. For a framework dev, sure
Re:Zod 4 by ramon156 on Tuesday May 20, 2025 @08:19AM (#44040729)
Well zod is for typescript, not laravel/livewire
Re:Zod 4 by tauchunfall on Tuesday May 20, 2025 @08:43AM (#44040934)
Yeah, it's very useful to validate schemas at compile-time and runtime. It prevents several different problems to occur.

Lately, I used code agents a lot, and having typescripts types infered from Zod schemas allows me to catch errors when the large-language model generated slightly wrong code.

Re:Zod 4 by justarobert on Tuesday May 20, 2025 @03:28PM (#44045013)
In that case, your objection seems to be to light weight or minimal frameworks rather than SPAs on this point. There are plenty of minimal backend frameworks for Node (and Python, and others) that can be and are used to build traditional "load a page for every interaction" applications, and Zod or something like it would be useful for those since minimal frameworks often don't include validation. Zod isn't exclusively for SPAs or even web applications. It's schema validation, which is useful in many domains.
Re:Zod 4 by hdjrudni on Wednesday May 21, 2025 @03:28AM (#44049157)
Zod is basically the standalone version of Laravel's validation (https://laravel.com/docs/12.x/validation#quick-writing-the-v...) so I'm not sure what exactly you're objecting to.

Unless you're saying

a) You don't validate user inputs b) You prefer validation to be bundled with the framework rather than having a choice