Skip to main content

SchemaOptions <T>

Type parameters

  • T

Index

Properties

Methods

Properties

api

api: Record<string, CriteriaFactory<T>>

A mapping of criteria to factories, to provide chainable validations.

optionaldefaultValue

defaultValue?: DefaultValue<T>

Default value to return when an undefined value is validated.

type

type: string

Type of schema.

Methods

optionalcast

  • cast(value: unknown): T
  • Function to cast the value when all validations pass.