Options
All
  • Public
  • Public/Protected
  • All
Menu

And field. Combines multiple object fields.

example
const schema = fields.and(fields.object({
a: fields.string(),
b: fields.number(),
}));

schema.create({
a: "hello",
b: 1
});

Type parameters

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new AndField<T>(...models: T): AndField<T>

Properties

Readonly model

model: AndFieldType<T>

models

models: T

Accessors

name

  • get name(): string

type

  • get type(): string

Methods

check

  • check(value: unknown): boolean

create

validate

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

Generated using TypeDoc