@vinejs/vine - v4.2.0
    Preparing search index...

    Class GroupConditional<Properties, Input, Output, CamelCaseOutput>

    GroupConditional represents a subset of object properties that are conditionally validated and merged based on a runtime condition. This allows schemas to have different required fields depending on the values in the object being validated.

    vine.group.if(
    (value) => value.shipping_required === true,
    {
    shipping_address: vine.string(),
    shipping_method: vine.string()
    }
    )

    Type Parameters

    • Properties extends Record<string, SchemaTypes>

      Record of property names to their schema types

    • Input

      Expected input type for these properties

    • Output

      Output type after validation and transformation

    • CamelCaseOutput

      Output type with camelCase property names

    Implements

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    "[ITYPE]": Input
    "[OTYPE]": Output
    "[COTYPE]": CamelCaseOutput

    Methods