Skip to content

Commit

Permalink
changed CreateOrganizationDto class as required
Browse files Browse the repository at this point in the history
Signed-off-by: Ganesh Nawle <ganesh.nawle@ayanworks.com>
Signed-off-by: KulkarniShashank <shashank.kulkarni@ayanworks.com>
  • Loading branch information
ganeshawle25 authored and KulkarniShashank committed Sep 11, 2024
1 parent d6583ec commit d96933a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,24 @@ export class CreateOrganizationDto {
@IsString({ message: 'registrationNumber must be in string format.' })
registrationNumber?: string;

@ApiProperty({ example: 'IN' })
@ApiPropertyOptional({ example: 'IN' })
@IsOptional()
@IsNotEmpty({ message: 'country is required' })
@MinLength(2, { message: 'country must be at least 2 characters' })
@MaxLength(50, { message: 'country must be at most 50 characters' })
@IsNumber()
countryId?: number;

@ApiProperty({ example: 'MH' })
@ApiPropertyOptional({ example: 'MH' })
@IsOptional()
@IsNotEmpty({ message: 'state is required' })
@MinLength(2, { message: 'state must be at least 2 characters' })
@MaxLength(50, { message: 'state must be at most 50 characters' })
@IsNumber()
stateId?: number;

@ApiProperty({ example: 'Mumbai' })
@ApiPropertyOptional({ example: 'Mumbai' })
@IsOptional()
@IsNotEmpty({ message: 'city is required' })
@MinLength(2, { message: 'city must be at least 2 characters' })
@MaxLength(50, { message: 'city must be at most 50 characters' })
Expand Down

0 comments on commit d96933a

Please sign in to comment.