Complete the code to apply ValidationPipe globally in a NestJS app.
app.useGlobalPipes(new [1]());The ValidationPipe is used to validate incoming requests globally in NestJS.
Complete the code to enable automatic transformation of input data types in ValidationPipe.
app.useGlobalPipes(new ValidationPipe({ [1]: true }));The transform option converts input data to the expected types automatically.
Fix the error in the code to forbid properties not in the DTO during validation.
app.useGlobalPipes(new ValidationPipe({ [1]: true }));The forbidNonWhitelisted option throws an error if extra properties are sent.
Fill both blanks to create a ValidationPipe that strips unknown properties and skips missing ones.
new ValidationPipe({ [1]: true, [2]: true })whitelist removes unknown properties, and skipMissingProperties allows missing optional fields.
Fill all three blanks to create a ValidationPipe with transformation, whitelist, and forbidding unknown properties.
new ValidationPipe({ [1]: true, [2]: true, [3]: true })This pipe transforms input types, removes unknown properties, and forbids extra properties.