Interface IValidationSchema<T>

Generic validation schema interface that can be implemented by any validation library. Compatible with Zod, Yup, Joi, and other validation libraries.

interface IValidationSchema<T> {
    parse(input: unknown): T;
}

Type Parameters

  • T = any

Methods

Methods

  • Parse and validate the input data. Should throw an error if validation fails. Can transform the data if the schema supports transformations.

    Parameters

    • input: unknown

    Returns T