NestJS · Middle · Question 67 of 75
Why might ValidationPipe not reject unknown query parameters by default?
- 1Nest removes all unknown parameters automatically
- 2Query parameters are never validated
- ✓Correct answer: Without
whitelistandforbidNonWhitelisted, extra properties are allowed and passed through
Explanation
Enable both options globally to make the API strict about its inputs.