Answers for "typescript class validator validate enum array"

0

typescript class validator validate enum array

export class UserDto {
  @IsEmail()
  readonly email: string;

  @IsOptional()
  @IsEnum(Permissions, { each: true })
  readonly permissions: Permissions[]; <- How to validate this?
}
Posted by: Guest on May-30-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language