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

    Class TransformModifier<Schema, Output>

    Modifies a literal schema type to apply custom transformations to validated values. This modifier allows converting validated values to any new datatype after validation.

    const schema = vine.string().transform((value) => value.toUpperCase())
    // Input: "hello" -> Output: "HELLO"

    Type Parameters

    • Schema extends ConstructableLiteralSchema<any, any, any>

      The underlying literal schema type to transform

    • Output

      The type of the transformed output

    Implements

    Index

    Constructors

    Properties

    "[ITYPE]": Schema[typeof ITYPE]

    Define the input type of the schema (unchanged from parent)

    "[OTYPE]": Output

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

    "[COTYPE]": Output

    Camelcase transformed output type

    Methods