Question · NestJS course · Module 10: Data Validation
@IsEnum Decorator
What is the @IsEnum() decorator used for in class-validator?
Answer options
- Checks whether the value belongs to a defined enum
- Creates a new TypeScript enum
- Converts a string to an enum
- Exports the enum to JSON
You can check the correct answer by solving this task in the CodeWorlds game.