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

Remove fallback error message from recaptcha validator #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vencelkatai
Copy link

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.

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

1 participant