Files
robinnetwork_website_server/src/dtos/portfolios/translation-language.dto.ts
2026-02-19 16:19:43 +03:30

27 lines
1.2 KiB
TypeScript

import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty, IsString, MaxLength, MinLength } from "class-validator";
export class TranslationLanguagePortfolioDto {
@ApiProperty({ name: "title", example: "عنوان بلاگ" })
@IsString({ message: "title should be a string" })
@IsNotEmpty({ message: "please fill the title" })
@MinLength(3, { message: "title should be 3 characters at least" })
@MaxLength(150, { message: "title can be 150 characters maximum" })
title: string;
@ApiProperty({ name: "description", example: "توضیحات" })
@IsString({ message: "description should be a string" })
@IsNotEmpty({ message: "please fill the description" })
@MinLength(10, { message: "description should be 10 characters at least" })
@MaxLength(800, { message: "description can be 800 characters maximum" })
description: string;
@ApiProperty({ name: "employer", example: "اقای رمضانی" })
@IsString({ message: "employer should be a string" })
@IsNotEmpty({ message: "please fill the employer" })
@MinLength(3, { message: "employer should be 3 characters at least" })
@MaxLength(50, { message: "employer can be 50 characters maximum" })
employer: string;
}