Skip to content

[13.x] Add validation rule builders for remaining validation rules - #61833

Merged
taylorotwell merged 9 commits into
laravel:13.xfrom
ericmp33:validation-rule-builders
Oct 8, 2026
Merged

taylorotwell merged 9 commits into
laravel:13.xfrom
ericmp33:validation-rule-builders

Conversation

@ericmp33

@ericmp33 ericmp33 commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

In #56346 and #56405 I tried to introduce validation rule builders to improve IDE support, making validation rules easier to discover and use through IDE autocompletion and navigation, so you don't have to use hardcoded strings if you don't want to. These PRs were submitted last year but eventually closed, with the suggestion that a cleaner approach to validation might be explored in Laravel 13.

Now that some time has passed, I'd like to revisit this idea and submit a new PR targeting Laravel 13, following the same approach I originally proposed, while adapting it to the new version where necessary.

example.mp4

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@ericmp33
ericmp33 marked this pull request as ready for review October 2, 2026 16:02
Comment thread src/Illuminate/Validation/Rules/AcceptedIf.php Outdated
Comment thread src/Illuminate/Validation/Rules/AcceptedIf.php

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could probably define a base class for cases like this that would otherwise be duplicated.

Comment thread src/Illuminate/Validation/Rules/IpAddress.php

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could also probably move this functionality to a base rule

ericmp33 and others added 7 commits October 5, 2026 07:17
Co-authored-by: Sebastian HÃĪdrich <11225821+shaedrich@users.noreply.github.com>
â€Ķs/AcceptedIf.php

Co-authored-by: Sebastian HÃĪdrich <11225821+shaedrich@users.noreply.github.com>
Co-authored-by: Sebastian HÃĪdrich <11225821+shaedrich@users.noreply.github.com>
@taylorotwell
taylorotwell merged commit dc3455f into laravel:13.x Oct 8, 2026
62 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.

3 participants