Consider the following type definition:
export type BranchOperatorRole = 'none' | 'seller' | 'operator' | 'administrator';
Which Class-Validator decorator should I use to ensure that a property matches one of these 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;
}