3 ms·
Zod has nothing to do with SPAs and isn't just a frontend tool. Do you not validate inputs in your code?
by zachrip 1y ago
Zod has nothing to do with SPAs and isn't just a frontend tool. Do you not validate inputs in your code?
- _1tem 1y agoLaravel/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
- ramon156 1y agoWell zod is for typescript, not laravel/livewire
- tauchunfall 1y agoYeah, 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.
- justarobert 1y agoIn 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.
- hdjrudni 1y agoZod is basically the standalone version of Laravel's validation (https://laravel.com/docs/12.x/validation#quick-writing-the-validation-logic 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