Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Support ConditionalRules within NestedRules #47344

Merged
merged 6 commits into from
Jun 7, 2023

Conversation

cosmastech
Copy link
Contributor

@cosmastech cosmastech marked this pull request as draft June 4, 2023 11:25
@cosmastech cosmastech marked this pull request as ready for review June 4, 2023 12:18
@cosmastech cosmastech changed the title [10.x] Support ConditionableRule within NestedRule [10.x] Support ConditionalRules within NestedRules Jun 4, 2023
@taylorotwell
Copy link
Member

Nowhere else in this class needs it the same call?

@taylorotwell
Copy link
Member

Just because I said that doesn't mean you have to add it everywhere btw - I want us to think through the problem in detail and actually know for sure where it needs to be added and why.

@cosmastech
Copy link
Contributor Author

Just because I said that doesn't mean you have to add it everywhere btw - I want us to think through the problem in detail and actually know for sure where it needs to be added and why.

Yes of course.

I have added two new tests (that will fail if you rollback the changes to NestedRules). They demonstrate the necessity of adding filterConditionalRules() to all cases of the validation: associative array, list, and ConditionalRules object.

@driesvints driesvints linked an issue Jun 5, 2023 that may be closed by this pull request
@taylorotwell taylorotwell merged commit 0307ae4 into laravel:10.x Jun 7, 2023
15 checks passed
@cosmastech cosmastech deleted the fix/conditionable-rules branch June 7, 2023 13:55
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.

Using ConditionalRules in NestedRules throws an exception.
2 participants