then you need a regexp validation via @Matches . @IsOptional() @Matches(`^${Object.values(UserRole).filter(v => typeof v !==
確定! 回上一頁