Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Field

Model field class.

Hierarchy

  • Field

Index

Constructors

constructor

Properties

Protected _cfg

Methods

alias

  • alias(): string
  • Returns string

config

defaultValue

  • defaultValue(): any
  • Returns any

isId

  • isId(): boolean
  • Returns boolean

name

  • name(): string
  • Returns string

nullable

  • nullable(): boolean
  • Returns boolean

set

  • set(val: any): any
  • Parameters

    • val: any

    Returns any

validate

  • Validates the passed value for this field.

    Parameters

    Returns boolean | string

    if the value is valid. A string may be returned if the value is not valid, to indicate an error message. Any other non true value indicates the value is not valid. This method is not implemented by default, subclasses may override it to provide an implementation.