Options
All
  • Public
  • Public/Protected
  • All
Menu

Optional field. Matches the provided field and additionally allows null and undefined values.

example
const schema = fields.nullable(fields.string());

schema.create("hello");
schema.create(null);

Type parameters

  • T

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Readonly model

model: FieldModel<T>

Optional Readonly options

Accessors

name

  • get name(): string

type

  • get type(): string

Methods

check

  • check(value: unknown): boolean

create

  • create(value: undefined | null | T): undefined | null | T

validate

  • validate(value: unknown, key?: string): true

Generated using TypeDoc