Skip to content

Commit

Permalink
fix: refactor description and name validations
Browse files Browse the repository at this point in the history
Signed-off-by: bhavanakarwade <[email protected]>
  • Loading branch information
bhavanakarwade committed Oct 14, 2024
1 parent 3ee7d61 commit ee5ecc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class CreateOrganizationDto {
@Transform(({ value }) => trim(value))
@IsNotEmpty({ message: 'Organization name is required.' })
@MinLength(2, { message: 'Organization name must be at least 2 characters.' })
@MaxLength(200, { message: 'Organization name must be at most 50 characters.' })
@MaxLength(200, { message: 'Organization name must be at most 200 characters.' })
@IsString({ message: 'Organization name must be in string format.' })
@IsNotSQLInjection({ message: 'Organization name is required.' })
name: string;
Expand All @@ -19,7 +19,7 @@ export class CreateOrganizationDto {
@Transform(({ value }) => trim(value))
@IsNotEmpty({ message: 'Description is required.' })
@MinLength(2, { message: 'Description must be at least 2 characters.' })
@MaxLength(1000, { message: 'Description must be at most 255 characters.' })
@MaxLength(1000, { message: 'Description must be at most 1000 characters.' })
@IsString({ message: 'Description must be in string format.' })
description: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class UpdateOrganizationDto {
@Transform(({ value }) => trim(value))
@IsNotEmpty({ message: 'Organization name is required.' })
@MinLength(2, { message: 'Organization name must be at least 2 characters.' })
@MaxLength(200, { message: 'Organization name must be at most 50 characters.' })
@MaxLength(200, { message: 'Organization name must be at most 200 characters.' })
@IsString({ message: 'Organization name must be in string format.' })
name: string;

Expand All @@ -24,7 +24,7 @@ export class UpdateOrganizationDto {
@Transform(({ value }) => trim(value))
@IsNotEmpty({ message: 'Description is required.' })
@MinLength(2, { message: 'Description must be at least 2 characters.' })
@MaxLength(1000, { message: 'Description must be at most 255 characters.' })
@MaxLength(1000, { message: 'Description must be at most 1000 characters.' })
@IsString({ message: 'Description must be in string format.' })
description: string;

Expand Down

0 comments on commit ee5ecc2

Please sign in to comment.