📄️ Results
Parsing with Sodd will never throw errors, unless something has gone very wrong within Sodd itself, or if the type safety is bypassed during usage. Instead, parsing will always return a Result object, which in turn will contain either the parsed data, or a list of issues that occured during parsing. This is similar to Zod's .safeParse method.
📄️ Error handling
This guide assumes you are familiar with Results.
📄️ Custom schemas
Work in progress! Custom schemas are very powerful, but we're still figuring out which building blocks to provide, and more importantly: how to explain them.
📄️ Working with forms
Depending on your setup, you might need to do some extra work to get Sodd to work with forms. In the FormData object, which is the web standard for working with forms, all values are strings. In vanilla JS/TS, and libraries and frameworks that also use this standard, you will likely want to convert the values to the correct types before parsing them with Sodd.