Skip to content

Commit

Permalink
Merge branch '5.1' of https://github.com/Talean-dev/framework into Ta…
Browse files Browse the repository at this point in the history
…lean-dev-5.1
  • Loading branch information
taylorotwell committed Jun 10, 2015
2 parents 045f1f5 + 331dc60 commit ed12f21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Illuminate/Validation/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,10 @@ protected function getSize($attribute, $value)
*/
protected function validateIn($attribute, $value, $parameters)
{
if (is_array($value) && in_array('array', $this->rules[$attribute])) {
return count(array_diff($value, $parameters)) == 0;
}

return in_array((string) $value, $parameters);
}

Expand Down

0 comments on commit ed12f21

Please sign in to comment.