I'm using the class-validator npm package and would like to validate that the type property of request body matches one either 'organization' or 'student'.
How would I do this with this package?
This doesn't work:
@IsIn(['organization', 'student'])
type: string
Request body example:
{
"type": "organization",
"email": "email@email.com",
"password": "veryscretpwd"
}