The schema type for validating array elements
Creates a new VineArray instance with element schema and optional configuration.
The schema to validate each array element
Optionaloptions: FieldOptionsField options like bail mode and nullability
Optionalvalidations: Validation<any>[]Initial set of validations to apply
StaticrulesStatic collection of all available validation rules for arrays
Unique name identifier for union type resolution
Define the input type of the schema for TypeScript inference
The output value type of the field after validation. The property points to a type only and not the real value.
Type marker for camelCase output type inference
Type checker function to determine if a value is an array. Required for "unionOfTypes" functionality.
The value to check
True if the value is an array
Clones the VineArray schema type. The applied options and validations are copied to the new instance.
A cloned instance of this VineArray schema
Compiles to array data type for the validation compiler.
Name of the property being compiled
Reference store for the compiler
Parser options
Compiled array node for validation
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.
Parser function to transform the input value
This schema instance for method chaining
Push a validation to the validations chain.
Validation rule or rule builder to add
This schema instance for method chaining
Mark the field under validation as optional. An optional field allows both null and undefined values.
A new OptionalModifier wrapping this schema
Mark the field under validation to be null. The null value will be written to the output as well.
If optional and nullable are used together, then both undefined
and null values will be allowed.
A new NullableModifier wrapping this schema
VineArray represents an array schema type in the validation pipeline. It validates arrays and their elements using a nested schema, with support for length constraints, uniqueness checks, and element filtering.
Example