property ValidationPluginOptions.whitelist

When true, strip properties the schema does not declare.

Applied once per middleware at registration time by calling the schema's own .strip() (Zod-style). A schema that does not expose .strip() — a non-object schema, or a validator other than Zod — is used unchanged, since schemas are duck-typed through safeParse.

Type

boolean

Usage

import { type ValidationPluginOptions } from "validation-plugin/src/index.ts";