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] Add MessageBag remove method #46043

Merged
merged 1 commit into from
Feb 9, 2023
Merged

[10.x] Add MessageBag remove method #46043

merged 1 commit into from
Feb 9, 2023

Conversation

guizoxxv
Copy link
Contributor

@guizoxxv guizoxxv commented Feb 9, 2023

This PR adds the ability to remove an existing message from the MessageBag using the key as parameter.

Scenario: I have an unversioned API that needs to support different parameter names temporarilly. I wanted to use a combination of the prepareForValidation and after validation in the FormRequest to achieve this, but I'm unable to replace the validation errors keys. Although I was able to solve the situation in a different way, I think that it would be nice to have this ability.

Here is a discussion around this topic.

@driesvints driesvints changed the title Add MessageBag remove method [10.x] Add MessageBag remove method Feb 9, 2023
@taylorotwell taylorotwell merged commit 4244bca into laravel:10.x Feb 9, 2023
@guizoxxv guizoxxv deleted the 10.x branch February 9, 2023 23:58
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