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

[9.x] Allow invokable rules to specify custom messsages #43925

Merged
merged 3 commits into from
Aug 31, 2022

Conversation

nshiro
Copy link
Contributor

@nshiro nshiro commented Aug 30, 2022

From Laravel 9.2 we have a simple way to specify a custom message when validating with a rule object. #41145
But it doesn't seem to work with invokable rules.
This PR makes invokable rules to work with #41145.

Copy link
Member

@timacdonald timacdonald left a comment

Choose a reason for hiding this comment

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

Seems like a clean fix. Tested locally and confirmed.

Thanks @nshiro for the PR ❤️

@nshiro
Copy link
Contributor Author

nshiro commented Aug 31, 2022

Thank you for reviewing my code.😀 @timacdonald

@taylorotwell taylorotwell merged commit 3f1b0a2 into laravel:9.x Aug 31, 2022
@nshiro nshiro deleted the invokable_rules_custom_messages branch August 31, 2022 23:22
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