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

Skip to content

[5.2] Array to string conversion issue in validateIn() method#14607

Merged
taylorotwell merged 1 commit into
laravel:5.2from
vigneshgurusamy:fix-validateIn
Aug 4, 2016
Merged

[5.2] Array to string conversion issue in validateIn() method#14607
taylorotwell merged 1 commit into
laravel:5.2from
vigneshgurusamy:fix-validateIn

Conversation

@vigneshgurusamy
Copy link
Copy Markdown
Contributor

validateIn() method does not handle multidimensional array. For example, When a multidimensional array passed for below mentioned rule

$rules = [
    'name' => 'sometimes|array|in:foo,bar
];

It will throw an Array to string conversion exception, because array_diff() used to compare the array

@vigneshgurusamy vigneshgurusamy changed the title Fix - Array to string conversion issue in validateIn() method [5.2] Array to string conversion issue in validateIn() method Aug 3, 2016
@taylorotwell taylorotwell merged commit 89db15c into laravel:5.2 Aug 4, 2016
@vigneshgurusamy vigneshgurusamy deleted the fix-validateIn branch August 4, 2016 13:31
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