Complete the code to enable whitelist in ValidationPipe.
app.useGlobalPipes(new ValidationPipe({ whitelist: [1] }));Setting whitelist to true removes properties that do not have decorators in DTOs.
Complete the code to enable automatic transformation in ValidationPipe.
app.useGlobalPipes(new ValidationPipe({ transform: [1] }));Setting transform to true converts payloads to DTO instances automatically.
Fix the error in the ValidationPipe options to whitelist and transform correctly.
app.useGlobalPipes(new ValidationPipe({ whitelist: [1], transform: [2] }));Both whitelist and transform should be set to true to enable filtering and conversion.
Fill both blanks to configure ValidationPipe with whitelist and transform enabled.
app.useGlobalPipes(new ValidationPipe({ whitelist: [1], transform: [2] }));Both whitelist and transform must be true to filter unwanted properties and convert payloads.
Fill all three blanks to configure ValidationPipe with whitelist, transform, and forbidNonWhitelisted options.
app.useGlobalPipes(new ValidationPipe({ whitelist: [1], transform: [2], forbidNonWhitelisted: [3] }));Enable whitelist and transform by setting them to true. Set forbidNonWhitelisted to false to allow extra properties without error.