Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[5.2] Fix a case with parameters of explicit depending rules#13058

Merged
taylorotwell merged 1 commit into
laravel:5.2from
themsaid:explicit-params-non-numeric-keys
Apr 7, 2016
Merged

[5.2] Fix a case with parameters of explicit depending rules#13058
taylorotwell merged 1 commit into
laravel:5.2from
themsaid:explicit-params-non-numeric-keys

Conversation

@themsaid
Copy link
Copy Markdown
Member

@themsaid themsaid commented Apr 7, 2016

As noted in #13047

This PR handles explicit depending rules when the explicit keys are non-numeric:

Validator::make(
    [
        'fields' => [
            'fr' => ['name' => '', 'content' => 'ragnar'],
            'es' => ['name' => '', 'content' => 'lagertha'],
        ]
    ],
    ['fields.*.name' => 'required_with:fields.*.content']
);

Before, it was only working with numeric keys [0, 1] rather than string keys ['fr', 'es'].

@taylorotwell taylorotwell merged commit de872dc into laravel:5.2 Apr 7, 2016
@themsaid themsaid deleted the explicit-params-non-numeric-keys branch April 21, 2016 08:16
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.

2 participants