Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Remove fallback error message from recaptcha validator #93

Open
vencelkatai wants to merge 1 commit into biscolab:master
base: master
Choose a base branch
Loading
from vencelkatai:feature/validation-error-message-cleanup

Conversation

@vencelkatai
Copy link

@vencelkatai vencelkatai commented Feb 9, 2024

Hi,

As it's already discussed in #63, using the trans helper in the boot method causes the translations to load, and any json translation file path added after will be never loaded.

While the workaround implemented in 5ceac2f can solve the issue if i set the "empty_message" config value to true, in my opinion it is totally unnecessary. Laravel validation uses the same error key by default, the provided message is just a fallback message.

I've added some tests to verify the behaviour is the same without setting the fallback error message.
The documented way of customizing the error message remains the same: https://github.com/biscolab/laravel-recaptcha?tab=readme-ov-file#customize-error-message
Nonetheless it can be a breaking change for ppl who modified the "error_message_key" in the recaptcha config and they didn't set the message in the validation.php lang file. I think the preferred way should be to set the translation instead.

zsocakave reacted with thumbs up emoji
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /