import { IsBoolean, IsNotEmpty, IsString, MaxLength } from 'class-validator'; import { getAppConfig } from '../../../config'; const { validation: { blogPostTitleMaxLength } } = getAppConfig(); export class UpdateBlogPostDto { @IsNotEmpty() @IsString() @MaxLength(blogPostTitleMaxLength) title: string; @IsString() contentHtml: string; @IsNotEmpty() @IsBoolean() isDraft: boolean; }