NestJS ValidationPipe with class-validator: global setup and limits
Register ValidationPipe globally with transform and whitelist to get automatic 400 responses for bad payloads, class instances in handlers, and stripping of unknown fields. Learn the mechanism, a minimal config, and common pitfalls.