Skip to content

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

Merged
taylorotwell merged 3 commits into
laravel:9.xfrom
nshiro:invokable_rules_custom_messages
Aug 31, 2022
Merged

[9.x] Allow invokable rules to specify custom messsages#43925
taylorotwell merged 3 commits into
laravel:9.xfrom
nshiro:invokable_rules_custom_messages

Conversation

@nshiro

@nshiro nshiro commented Aug 30, 2022

Copy link
Copy Markdown
Contributor

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.

@driesvints
driesvints requested a review from timacdonald August 30, 2022 07:15

@timacdonald timacdonald left a comment

Copy link
Copy Markdown
Member

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

nshiro commented Aug 31, 2022

Copy link
Copy Markdown
Contributor Author

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