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

fixes #541, by returning value instead of indexed value #542

Merged
merged 10 commits into from
Feb 27, 2022

Conversation

yubarajshrestha
Copy link
Contributor

@yubarajshrestha yubarajshrestha commented Feb 25, 2022

Closes #541

It fixes the nested validation issue in case of single item inside an array.

// eg: 1
{
    "key": [
        {"foo": "bar"},
    ]
}

// eg: 2
{
    "key": [
        {"foo": "bar"},
        {"foo": "barz"},
    ]
}
validate.required(['key.*.foo']) 
"""
This was failing in eg: 1 but works in eg: 2
Above validation was supposed to work in both cases...
"""

@josephmancuso josephmancuso merged commit b26386a into MasoniteFramework:4.0 Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested Validation with list
3 participants