From 9a29a48e27e12e752008b3207f580e1eb612cb79 Mon Sep 17 00:00:00 2001
From: sovrgn <boyan.tsolov@vereign.com>
Date: Wed, 11 Oct 2023 17:33:54 +0300
Subject: [PATCH] fix: possibly validateif needs to be for every single
 decorator

---
 libs/dtos/src/dtos/requests/proof.req.dto.ts | 6 ++++--
 1 file changed, 4 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 e67c1819..4b33d363 100644
--- a/libs/dtos/src/dtos/requests/proof.req.dto.ts
+++ b/libs/dtos/src/dtos/requests/proof.req.dto.ts
@@ -2,13 +2,15 @@ import { IsNotEmpty, IsString, ValidateIf } from "class-validator";
 
 
 export class ProofReqDto {
+  @ValidateIf((o) => o.proofUrl === undefined)
   @IsString()
-  @IsNotEmpty()
   @ValidateIf((o) => o.proofUrl === undefined)
+  @IsNotEmpty()
   proofRecordId: string;
 
+  @ValidateIf((o) => o.proofRecordId === undefined)
   @IsString()
-  @IsNotEmpty()
   @ValidateIf((o) => o.proofRecordId === undefined)
+  @IsNotEmpty()
   proofUrl: string;
 }
\ No newline at end of file
-- 
GitLab