Skip to content

[6.x] Fix validation rule 'required_unless' when other field value is boolean.#33715

Merged
taylorotwell merged 1 commit into
laravel:6.xfrom
liquid207:fix-validation-rule-required-unless
Jul 31, 2020
Merged

[6.x] Fix validation rule 'required_unless' when other field value is boolean.#33715
taylorotwell merged 1 commit into
laravel:6.xfrom
liquid207:fix-validation-rule-required-unless

Conversation

@liquid207

Copy link
Copy Markdown
Contributor
Validator::make(['a' => false ], [ 'b' => 'required_unless:a,false']);

This validator should pass, but fail, this PR fix it.

@driesvints driesvints changed the title Fix validation rule 'required_unless' when other field value is boolean. [6.x] Fix validation rule 'required_unless' when other field value is boolean. Jul 31, 2020

@driesvints driesvints left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since required_if works in the same way this lgtm.

@liquid207

Copy link
Copy Markdown
Contributor Author

@driesvints Thanks

@taylorotwell
taylorotwell merged commit 6a15aa5 into laravel:6.x Jul 31, 2020
@liquid207
liquid207 deleted the fix-validation-rule-required-unless branch August 2, 2020 11:54
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.

3 participants