Defines a contract validator function.
Validators can transform the input.
Note: Validators are expected to throw ContractError on failure, not return it.
Type Parameters
TInput = unknown
The expected type of the input to be validated.
TOutput = any
The expected type of the transformed output.
Param: input
The input to be validated and potentially transformed.
Defines a contract validator function. Validators can transform the input. Note: Validators are expected to throw ContractError on failure, not return it.