Zod — валидация и DTO в NestJS
engineering
zod-patterns is a Claude Code skill that defines validation standards and DTO construction for the MX Space project using Zod and nestjs-zod. It is invoked automatically when creating schemas, DTO classes, or handling request validation. The skill documents two layers of custom validators from `apps/core/src/common/zod/`: primitives such as `zNonEmptyString`, `zCoerceBoolean`, `zPaginationPage`, `zSortOrder`, and `zArrayUnique`, plus domain-specific helpers including `zSlug`, `zEmail`, `zPinDate`, `zEntityId`, `zRefTypeTransform`, and `zLang`. Covered patterns include Snowflake entity ID validation, schema composition via `.extend()`, conditional validation with `.refine()`, and TypeScript type inference via `z.infer`. Ideal for developers building NestJS services that require type-safe, structured request validation.
- #zod
- #validation
- #nestjs
- #dto
- #typescript