iya-sts
    Preparing search index...
    check: (
        req: any,
        where: any,
        schema: any,
    ) =>
        | { code: any; detail: any; field: any; ok: boolean }
        | { ok: boolean; value: any } = check

    Type Declaration

      • (
            req: any,
            where: any,
            schema: any,
        ):
            | { code: any; detail: any; field: any; ok: boolean }
            | { ok: boolean; value: any }
      • Validates one input group of a request against a zod object schema.

        Every field must be a scalar unless the schema declares it repeatable, no polluting key is accepted, and unknown keys are stripped. A line break is allowed only in the body. Never throws for a bad request.

        Parameters

        • req: any

          the express request

        • where: any

          query, body, params or headers

        • schema: any

          the zod object schema

        Returns
            | { code: any; detail: any; field: any; ok: boolean }
            | { ok: boolean; value: any }

        { ok: true, value } with the parsed data, or a refusal