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

    Class VineTuple<Schema, Input, Output, CamelCaseOutput>

    VineTuple is an array with known length and may have different schema type for each array element.

    Type Parameters

    • Schema extends SchemaTypes[]
    • Input extends any[]
    • Output extends any[]
    • CamelCaseOutput extends any[]

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    "[ITYPE]": Input

    Define the input type of the schema for TypeScript inference

    "[OTYPE]": Output

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

    "[COTYPE]": CamelCaseOutput

    Type marker for camelCase output type inference

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

    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 with.

      Parameters

      • callback: ParseFn

        Parser function to transform the input value

      Returns this

      This schema instance for method chaining

      vine.string().parse((value) => {
      return typeof value === 'string' ? value.trim() : value
      })
    • Checks if the value is of array type. The method must be implemented for "unionOfTypes"

      Parameters

      • value: unknown

      Returns value is any[]