I have this type:
export type BranchOperatorRole = 'none' | 'seller' | 'operator' | 'administrator';
With which class-validator decorator can I validate that a property has one of those values?
import { IsEmail, IsString, Contains } from "class-validator";
export type BranchOperatorRole = 'none' | 'seller' | 'operator' | 'administrator';
export class AddBranchOperatorRequest extends User {
@IsEmail()
email: string;
@Contains(BranchOperatorRole )
role: BranchOperatorRole;
}