Parses data with a Zod schema and throws the SDK ValidationError on failure.
ValidationError
Zod schema used for validation.
Unknown value to parse.
Optional
Optional error message used when validation fails.
Parsed schema output.
If the value does not satisfy the provided schema.
Parses data with a Zod schema and throws the SDK
ValidationErroron failure.