File

src/models/key-value.model.ts

Index

Properties

Properties

name
Type : string
Decorators :
@IsString()
@IsNotEmpty()
@prop({required: false, validate: /\S+/})
value
Type : string
Decorators :
@IsString()
@IsNotEmpty()
@prop({required: false, validate: /\S+/})
import { prop } from '@typegoose/typegoose'
import { IsString, IsNotEmpty } from 'class-validator'

export class KeyValueModel {
  @IsString()
  @IsNotEmpty()
  @prop({ required: false, validate: /\S+/ })
  name: string

  @IsString()
  @IsNotEmpty()
  @prop({ required: false, validate: /\S+/ })
  value: string
}

results matching ""

    No results matching ""