From 633498ebae81970fb39c449a7cb59b3e5971e413 Mon Sep 17 00:00:00 2001
From: sovrgn <boyan.tsolov@vereign.com>
Date: Wed, 11 Oct 2023 10:57:44 +0300
Subject: [PATCH] fix: proof req validate

---
 libs/dtos/src/dtos/requests/proof.req.dto.ts | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libs/dtos/src/dtos/requests/proof.req.dto.ts b/libs/dtos/src/dtos/requests/proof.req.dto.ts
index 01a8d2c8..7d70ea6b 100644
--- a/libs/dtos/src/dtos/requests/proof.req.dto.ts
+++ b/libs/dtos/src/dtos/requests/proof.req.dto.ts
@@ -1,4 +1,4 @@
-import { IsNotEmpty, IsString } from "class-validator";
+import { IsNotEmpty, IsString, ValidateIf } from "class-validator";
 
 
 // INFO: should cover:
@@ -10,8 +10,11 @@ import { IsNotEmpty, IsString } from "class-validator";
 export class ProofReqDto {
   @IsString()
   @IsNotEmpty()
+  @ValidateIf((o) => o.proofUrl === undefined)
   proofRecordId: string;
 
   @IsString()
-  proofUrl?: string;
+  @IsNotEmpty()
+  @ValidateIf((o) => o.proofUrl === undefined)
+  proofUrl: string;
 }
\ No newline at end of file
-- 
GitLab