nest
    Preparing search index...

    Class ZodValidationPipe<T>

    Zod schema validation pipe: Safely transform and validate user input and return it or throw UnprocessableEntityException with detailed error object

    Type Parameters

    • T extends ZodType

    Implements

    • PipeTransform
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    schema: T

    Methods

    • Method to implement a custom pipe. Called with two parameters

      Parameters

      • value: unknown

        argument before it is received by route handler method

      Returns Promise<output<T>>