Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TypedMetadataOptions<T>

Type Parameters

  • T = any

Hierarchy

  • TypedMetadataOptions

Index

Properties

alias?: string

字段别名 转换时如果优先从别名字段取值

description?: string

字段描述

elementRules?: string | Rule | Rule[] | string[]

成员类型 Map | Set | Promise | Array 等验证成员类型

nullable?: boolean

是否可为null 默认false

required?: string | true

字段是否必须,非必须则允许undefined 默认允许, 为string时required为true,同时作为验证消息

rules?: string | Rule | Rule[] | string[]

验证规则

strict?: boolean

严格转换类型 当值为null或者undefined,为true时会被严格转换为指定的类型

Methods

  • transform(values: any, allValues: any): undefined | T