Skip to content

[12.x] Fix AnyOf constructor parameter type #55577

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

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

axlon
Copy link
Contributor

@axlon axlon commented Apr 28, 2025

The AnyOf rule was introduced in #55191 and allows developers to specify multiple validation paths for a single field.

The doc block of the rule's constructor is currently invalid (its missing a starting backslash), but even if that were to be fixed the doc block would still be invalid. This is because the doc currently doesn't allow Illuminate\Contracts\Validation\Rule nor string rules. This PR fixes this by changing the argument type to array which matches Rule::anyOf().

@taylorotwell taylorotwell merged commit 797c2bb into laravel:12.x Apr 28, 2025
60 checks passed
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.

2 participants