Skip to content
Snippets Groups Projects
Commit 633498eb authored by Boyan Tsolov's avatar Boyan Tsolov
Browse files

fix: proof req validate

parent d566e7f7
No related branches found
No related tags found
1 merge request!44Preparations for ui
Pipeline #66515 canceled with stage
in 18 seconds
This commit is part of merge request !43. Comments created here will be created in the context of that merge request.
import { IsNotEmpty, IsString } from "class-validator"; import { IsNotEmpty, IsString, ValidateIf } from "class-validator";
// INFO: should cover: // INFO: should cover:
...@@ -10,8 +10,11 @@ import { IsNotEmpty, IsString } from "class-validator"; ...@@ -10,8 +10,11 @@ import { IsNotEmpty, IsString } from "class-validator";
export class ProofReqDto { export class ProofReqDto {
@IsString() @IsString()
@IsNotEmpty() @IsNotEmpty()
@ValidateIf((o) => o.proofUrl === undefined)
proofRecordId: string; proofRecordId: string;
@IsString() @IsString()
proofUrl?: string; @IsNotEmpty()
@ValidateIf((o) => o.proofUrl === undefined)
proofUrl: string;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment