DEV Community

Input Validation

Shahar Kedar on March 17, 2024

On the previous chapter I used a boring example for using Zod. It was boring because there was no external input involved. Zod is useful when we ...
Collapse
 
akivaschiff profile image
akivaschiff

This is great! I think the line I loved most was "I would argue that it's best to catch an error as close as possible to the source of the error". You've put in to words a feeling I've had but I've never had a sentence for it and now I do. One thing I found a little complicated with zod is that sometimes the errors it throws aren't very clear. Will you be getting into understanding zod errors?

Collapse
 
shaharke profile image
Shahar Kedar

Absolutely!