Class DateType<TRequired>

Date type definition with ISO parsing support.

Type Parameters

  • TRequired extends boolean = false

Hierarchy (View Summary)

Constructors

Properties

_required: boolean
defaultValue?: TypeOutput<Date, TRequired> | () => TypeOutput<Date, TRequired>
hasDefault: boolean
isSensitive: boolean
isVirtual: boolean
options: Record<string, unknown>
validators: ValidatorFunction<Date>[]

Methods

  • Flag the field as sensitive so joins/exposures can omit it by default.

    Parameters

    • isSensitive: boolean = true

    Returns this

  • Validate the supplied value and return the normalized result.

    Parameters

    • value: unknown
    • fieldName: string = 'field'

    Returns TypeOutput<Date, TRequired>