diff --git a/src/modules/transaction/reconciliation/infrastructure/dto/cancel-top-dto.ts b/src/modules/transaction/reconciliation/infrastructure/dto/cancel-top-dto.ts index 042a863..63cc18f 100644 --- a/src/modules/transaction/reconciliation/infrastructure/dto/cancel-top-dto.ts +++ b/src/modules/transaction/reconciliation/infrastructure/dto/cancel-top-dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { IsNotEmpty, IsString } from 'class-validator'; +import { IsString, ValidateIf } from 'class-validator'; export class OtpVerifyDto { @ApiProperty({ @@ -9,6 +9,6 @@ export class OtpVerifyDto { example: '2345', }) @IsString() - @IsNotEmpty() + @ValidateIf((body) => body.otp_code) otp_code: string; }