Validate input without exceptions or allocations
You need to validate values at an application boundary and prefer a result you can inspect over exception-driven control flow.
var nameSchema = Z.String().Min(3).Max(50);
var result = nameSchema.Validate("John");
if (result.IsSuccess)
Console.WriteLine($"Valid name: {result.Value}"); What you get: Validate/SafeParse return a ValidationResult<T> with no exceptions, while Parse still throws ZodException when you want that behaviour.
Validation is zero-allocation on every valid input path, so the performance claim is a property of the code rather than an aspiration.
Read the guide →