Skip to content
Snippets Groups Projects
Commit 81c8389c authored by Ronnie Friman's avatar Ronnie Friman
Browse files

add validation for group class

parent 1a28aa26
No related branches found
No related tags found
3 merge requests!59Development to master,!54Development to testing,!49Replay update
......@@ -9,6 +9,7 @@ import {
Max,
IsOptional,
IsHexColor,
IsIn,
} from 'class-validator';
import { GameEntity } from '../game/game.entity';
......@@ -57,6 +58,8 @@ export class GameGroupDTO {
@IsString()
@Length(3, 31)
name: string;
@IsIn(['infantry', 'recon', 'mechanized'])
class: string;
@IsUUID('4')
faction: FactionEntity;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment