Skip to content

question: does schema.array() validate tuple positions? #2

@f4rkh4d

Description

@f4rkh4d

Hey, been using lua-schema in a small config validator and it's been solid. One thing I couldn't figure out: is there a way to validate fixed-position tuples? Like {string, number, boolean} where each position has its own type.

In Zod you'd do z.tuple([z.string(), z.number(), z.boolean()]). Wondering if there's an equivalent or if I should just use a table schema with numeric keys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions