Register one global `ValidationPipe` at bootstrap: ```ts app.useGlobalPipes(new ValidationPipe({ transform: true, whitelist: true, forbidNonWhitelisted: true, })); ``` Use DTO classes with `class-validator` decorators. `transform` instantiates DTOs and converts primitives, `whitelist` strips properties without decorators, and `forbidNonWhitelisted` rejects unexpected input instead of silently accepting it. Apply `ParseIntPipe` or `ParseUUIDPipe` to route IDs, and use `@ValidateNested()` plus ...
Installs into .claude/skills of the current project.
Are you the author of Nestjs Controllers Services?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-nestjs-controllers-services-28737f6f)
Register one global `ValidationPipe` at bootstrap:
```ts
app.useGlobalPipes(new ValidationPipe({
transform: true,
whitelist: true,
forbidNonWhitelisted: true,
}));
```
Use DTO classes with `class-validator` decorators. `transform` instantiates DTOs and converts primitives, `whitelist` strips properties without decorators, and `forbidNonWhitelisted` rejects unexpected input instead of silently accepting it. Apply `ParseIntPipe` or `ParseUUIDPipe` to route IDs, and use `@ValidateNested()` plus `@Type()` for nested DTOs.