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

Skip to content

[5.2] Fix required_if with bools#13327

Merged
taylorotwell merged 1 commit into
laravel:5.2from
themsaid:validator-required-if-patch
Apr 27, 2016
Merged

[5.2] Fix required_if with bools#13327
taylorotwell merged 1 commit into
laravel:5.2from
themsaid:validator-required-if-patch

Conversation

@themsaid
Copy link
Copy Markdown
Member

Validator::make(['foo' => true], ['bar' => 'required_if:foo,false']); // currently fails

That's because:

in_array(true, ['anythingString']); // true
in_array(false, ['anythingString']); // false

@taylorotwell taylorotwell merged commit 105fdb2 into laravel:5.2 Apr 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants