@vinejs/vine - v4.0.0-next.1
    Preparing search index...

    Class VineOptional<Output>

    Specify an optional value inside a union.

    Type Parameters

    • Output

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    "[ITYPE]": null | undefined

    The input type of the schema

    "[OTYPE]": Output

    The output value of the field. The property points to a type only and not the real value.

    "[COTYPE]": Output

    Type marker for camelCase output type inference

    "[SUBTYPE]": string = 'optional'

    The subtype of the literal schema field

    "[UNIQUE_NAME]": string = 'vine.optional'

    The property must be implemented for "unionOfTypes"

    Methods

    • Define a method to parse the input value. The method is invoked before any validation and hence you must perform type-checking to know the value you are working it.

      Parameters

      • callback: ParseFn

      Returns this