class-validator supports groups — decorators declare which groups they belong to, and ValidationPipe is configured with a specific group to run. Extend ValidationPipe with different group settings for create (all fields required) and update (all fields optional) handlers.
Decorators without a groups option apply to ALL groups — always specify groups explicitly.
Use skipMissingProperties: true on update groups so absent fields are not treated as errors.
Groups are passed as a string array — multiple groups can be active simultaneously.
A decorator with groups: ['create'] is completely ignored during update validation.
For simple create/update patterns, separate CreateDto and UpdateDto classes (with PartialType) is often cleaner.