Skip to content

Conversation

@lloricode
Copy link
Contributor

When we try this, all validation will failed

// controller level

$this->validate($request, [
    'some_field' => Rule::exists(ModelClass::class)->where('extra->field', true),
]);

Checking return of DatabaseRule formatWheres will return

"extra->field,"1""

Now the PR fixes return is

"extra->field,true"

Thank you

@taylorotwell taylorotwell merged commit e3f48f7 into laravel:8.x Mar 3, 2021
@lloricode lloricode deleted the bugfix/database-rules-formatWheres branch March 3, 2021 14:17
taylorotwell added a commit that referenced this pull request Mar 3, 2021
taylorotwell added a commit that referenced this pull request Mar 3, 2021
taylorotwell added a commit that referenced this pull request Mar 3, 2021
taylorotwell added a commit that referenced this pull request Mar 3, 2021
taylorotwell added a commit that referenced this pull request Mar 4, 2021
taylorotwell added a commit that referenced this pull request Mar 4, 2021
@taylorotwell
Copy link
Member

Had to revert this. Breaking people's applications.

@driesvints
Copy link
Member

@lloricode fyi: #36459

@lloricode
Copy link
Contributor Author

@lloricode fyi: #36459

Thank you for informing us

@niefufeng
Copy link

Should be consistent with builder query

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.

4 participants