Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requiredIf rules not available on array or object #71

Closed
padinko opened this issue Aug 26, 2024 · 0 comments
Closed

requiredIf rules not available on array or object #71

padinko opened this issue Aug 26, 2024 · 0 comments
Assignees
Labels
Type: Enhancement Improving an existing feature

Comments

@padinko
Copy link

padinko commented Aug 26, 2024

Package version

2.1.0

Describe the bug

there is no requiredIf* rules available when using array validator:

vine.compile(
    vine.object({
        ids: vine.array(
            vine.string(),
        )
            .optional()
            .requiredIfMissing('all'),

        all: vine.literal(true)
            .optional()
            .requiredIfMissing('ids'),
    }),
);

will throw:

vine.array(...).optional(...).requiredIfMissing is not a function

Reproduction repo

No response

UPDATE

It's missing on object too:

vine.object(...).optional(...).requiredIfMissing is not a function
@thetutlage thetutlage self-assigned this Aug 27, 2024
@thetutlage thetutlage added the Type: Enhancement Improving an existing feature label Aug 27, 2024
@padinko padinko changed the title requiredIf rules not available on array requiredIf rules not available on array or object Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improving an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants