27 lines
1.2 KiB
TypeScript
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;
|
|
}
|