diff --git a/src/modules/customers/dto/company-registration-number.dto.ts b/src/modules/customers/dto/company-registration-number.dto.ts index c7f513a9..ca986bd4 100644 --- a/src/modules/customers/dto/company-registration-number.dto.ts +++ b/src/modules/customers/dto/company-registration-number.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { IsNotEmpty, IsString, Length } from 'class-validator'; +import { IsNotEmpty, IsString, MaxLength, MinLength } from 'class-validator'; export class CompanyRegistrationNumberDto { @ApiProperty({ @@ -9,6 +9,7 @@ export class CompanyRegistrationNumberDto { }) @IsString() @IsNotEmpty() - @Length(8, 10) + @MinLength(8) + @MaxLength(10) companyRegistrationNumber: string; } diff --git a/src/modules/customers/dto/dtfs-customer.dto.ts b/src/modules/customers/dto/dtfs-customer.dto.ts index 54fc5220..71e53b50 100644 --- a/src/modules/customers/dto/dtfs-customer.dto.ts +++ b/src/modules/customers/dto/dtfs-customer.dto.ts @@ -1,11 +1,12 @@ import { ApiProperty } from '@nestjs/swagger'; -import { IsNotEmpty, IsString, Length } from 'class-validator'; +import { IsNotEmpty, IsString, MinLength, MaxLength } from 'class-validator'; export class DTFSCustomerDto { @ApiProperty({ description: 'Company Registration Number', minLength: 8, maxLength: 10 }) @IsString() @IsNotEmpty() - @Length(8, 10) + @MinLength(8) + @MaxLength(10) companyRegistrationNumber: string; @ApiProperty({ description: 'Company Name' })