You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
444 B

import { Type } from 'class-transformer'
import {
ArrayMaxSize,
ArrayMinSize,
IsNotEmptyObject,
IsString,
ValidateNested
} from 'class-validator'
import { MapDtoValidated } from './MapDtoValidated'
export class GameCreationDtoValidated {
@IsString({ each: true })
@ArrayMaxSize(2)
@ArrayMinSize(2)
playerNames!: string[]
@IsNotEmptyObject()
@ValidateNested()
@Type(() => MapDtoValidated)
map!: MapDtoValidated
}