Skip to content

Instantly share code, notes, and snippets.

@borislavstoychev
Created March 8, 2022 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borislavstoychev/27dca256c445294dc4e6fe463b7ab259 to your computer and use it in GitHub Desktop.
Save borislavstoychev/27dca256c445294dc4e6fe463b7ab259 to your computer and use it in GitHub Desktop.
file
import { ApiProperty } from '@nestjs/swagger'
import { Expose } from 'class-transformer'
import { IsDateString, IsEmail, IsNotEmpty, IsString } from 'class-validator'
@Expose()
export class CreateBootcampDto {
@ApiProperty()
@Expose()
@IsString()
@IsNotEmpty()
status: string
@ApiProperty()
@Expose()
@IsString()
@IsNotEmpty()
title: string
@ApiProperty()
@Expose()
@IsEmail()
@IsNotEmpty()
email: string
@ApiProperty()
@Expose()
@IsString()
@IsNotEmpty()
message: string
@ApiProperty()
@Expose()
@IsDateString()
@IsNotEmpty()
date: string
@ApiProperty()
@Expose()
@IsString()
firstName: string
@ApiProperty()
@Expose()
@IsString()
lastName: string
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment