diff --git a/src/faction/faction.dto.ts b/src/faction/faction.dto.ts index a5b9f044bdf74edefa37ac077e09a3e384e5e5c3..0b65c47007d6424584d8fdb35ac9d9ee53eaa924 100644 --- a/src/faction/faction.dto.ts +++ b/src/faction/faction.dto.ts @@ -7,14 +7,18 @@ import { IsNumber, Min, Max, + IsOptional, } from 'class-validator'; import { GameEntity } from '../game/game.entity'; -import { RoleValidation } from '../shared/custom-validation'; +import { RoleValidation, Uuid } from '../shared/custom-validation'; import { GameDTO } from '../game/game.dto'; import { FactionEntity, GameGroupEntity } from './faction.entity'; export class FactionDTO { + @IsOptional() + @IsUUID('4') + factionId?: string; @IsString() @IsNotEmpty() @Length(2, 31)