Interface ZodTypePlugin

interface ZodTypePlugin {
    valueType: ZodTypeAny;
    addError(error: string | ZodIssue): void;
}

Properties

Methods

Properties

valueType: ZodTypeAny

The Zod validation type of the root value.

Methods

  • Associates an error with the field.

    If a string is provided it becomes an error message. The error code in this case is set to "custom".

    Parameters

    • error: string | ZodIssue

      The error to add.

    Returns void