Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

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?
}
Source by github.com #
 
PREVIOUS NEXT
Tagged: #typescript #class #validator #validate #enum #array
ADD COMMENT
Topic
Name
5+7 =