/zod
@thourum/fault/zod converts Zod validation failures into typed Result values.
safeZodParse
Use the direct form for one value or the curried form when the same schema validates multiple values; validation failures are converted with fromZodError. safeZodParse(schema, undefined) parses undefined; only omitting the second argument returns a parser.
Tag produced: VALIDATION_ERROR.
fromZodError
fromZodError(error: z.ZodError): Fault
The fault message uses the first issue, details remains unset, its cause is the original ZodError, and metadata contains zodIssues, issueCount, and fieldErrors from Zod 4's z.flattenError(error).
Tag produced: VALIDATION_ERROR.