feat: dto fix

This commit is contained in:
Nevo David 2025-07-02 12:37:56 +07:00
parent 530c14356a
commit 293e15e043
1 changed files with 4 additions and 9 deletions

View File

@ -1,25 +1,20 @@
import {
IsDefined,
IsOptional,
IsString,
IsUrl,
MaxLength,
MinLength,
IsDefined, IsOptional, IsString, IsUrl, MaxLength, MinLength, ValidateIf
} from 'class-validator';
export class PinterestSettingsDto {
@IsString()
@IsOptional()
@ValidateIf((o) => !!o.title)
@MaxLength(100)
title: string;
@IsString()
@IsOptional()
@ValidateIf((o) => !!o.link)
@IsUrl()
link: string;
@IsString()
@IsOptional()
@ValidateIf((o) => !!o.dominant_color)
dominant_color: string;
@IsDefined({