Question · NestJS course · Module 10: Data Validation

@IsString Decorator

What does the @IsString() decorator from the class-validator library do?

Answer options

  • Converts the value to a string
  • Removes whitespace from text
  • Encrypts text before saving
  • Checks whether the value is a string

You can check the correct answer by solving this task in the CodeWorlds game.