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

[6.x] Add new validateWithBag macro to Request #30896

Merged
merged 1 commit into from Dec 23, 2019
Merged

[6.x] Add new validateWithBag macro to Request #30896

merged 1 commit into from Dec 23, 2019

Conversation

paulhenri-l
Copy link
Contributor

@paulhenri-l paulhenri-l commented Dec 21, 2019

Add new validateWithBag macro to the Request class.

This method will allow people to specify the name of the bag validation errors should be put in.

Why?

This convenience method already existed in the ValidatesRequests trait.

Adding it as a macro will help people keep their code consistent and either stick to the Request macros for validation or the ValidatesRequests trait.

@taylorotwell taylorotwell merged commit fdeb204 into laravel:6.x Dec 23, 2019
@taylorotwell
Copy link
Member

Can you make a PR to document this. Nice work.

@paulhenri-l
Copy link
Contributor Author

@taylorotwell Sure I'll do that

@paulhenri-l paulhenri-l deleted the validate-request-with-bag branch December 23, 2019 22:10
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.

None yet

2 participants