Skip to content

Commit

Permalink
Feat update validation for nickname and title length
Browse files Browse the repository at this point in the history
  • Loading branch information
minai621 committed Jul 31, 2024
1 parent feb21b3 commit ec9774f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion backend/src/users/dto/change-nickname.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ApiProperty } from "@nestjs/swagger";
import { MinLength } from "class-validator";

export class ChangeNicknameDto {
@ApiProperty({ type: String, description: "Nickname of user to update" })
@ApiProperty({ type: String, description: "Nickname of user to update", minLength: 2 })
@MinLength(2)
nickname: string;
}
4 changes: 3 additions & 1 deletion backend/src/workspaces/dto/create-workspace.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { ApiProperty } from "@nestjs/swagger";
import { MinLength } from "class-validator";

export class CreateWorkspaceDto {
@ApiProperty({ description: "Title of project to create", type: String })
@ApiProperty({ description: "Title of project to create", type: String, minLength: 2 })
@MinLength(2)
title: string;
}

0 comments on commit ec9774f

Please sign in to comment.