Skip to content

vine.unique and vine.exist cause an error when used inside vine.object #1

@cgMorpheus

Description

@cgMorpheus

Package version

2.1.0

Describe the bug

When using the vine.unique or vine.exist functions (defined in adonis/lucid) inside a vine.object, most node ace ... commands fail with the following error:
`
TypeError: vine.string(...).exist is not a function

import vine from '@vinejs/vine';
export const myTaskSchema = vine.object({
mailService: vine
.string()
.exists(async (db, value) => {
`
Strangely, this issue does not occur if the schema is explicitly using vine.compile(vine.object(...)). Also, my unit tests do not trigger this error neither server in dev mode.

This behavior seems similar to issue #62.

Reproduction repo

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions