Safely parses the input using the provided Zod schema (v3 or v4) and returns a result object indicating success or failure. This function is compatible with both Zod v3 and v4 schemas.
The expected output type of the schema.
The Zod schema (v3 or v4) to use for parsing.
The input value to parse.
An object with either the parsed data (on success) or the error (on failure).
If the schema is not a recognized Zod v3 or v4 schema.
Safely parses the input using the provided Zod schema (v3 or v4) and returns a result object indicating success or failure. This function is compatible with both Zod v3 and v4 schemas.