You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using a frontend registration form for users on one of our sites, and we wanted to change some of the translated form validation error messages to be a bit more informative/clear. However, it seems that the translation string for the validation error 'unique_user_value', which is displayed when an e-mail address is already in use, cannot be overwritten.
How to reproduce
We created a validation.php file inside lang/de_CH with the following content for testing:
`<?php
return [
'unique' => 'Diese E-Mail ist bereits vergeben.',
'unique_entry_value' => '1 Dieser Wert wurde bereits vergeben.',
'unique_form_handle' => '2 Dieser Wert wurde bereits vergeben.',
'unique_term_value' => '3 Dieser Wert wurde bereits vergeben.',
'unique_user_value' => '4 Dieser Wert wurde bereits vergeben.',
'confirmed' => 'Die Passwörter stimmen nicht überein.'
];`
In config/app.php, there's the following settings (APP_FALLBACK_LOCALE is set to de_CH in the .env):
` 'locale' => 'de_CH',
Inside the control panel's sites settings, both locale and lang are set to de_CH as well. This is a single site installation.
When trying to register a user with an e-mail address that is already in use, the expected validation error message would be "4 Dieser Wert wurde bereits vergeben." from the unique_user_value translation. Instead, what is actually displayed is the de_CH translation string from inside the vendor folder, which we could test and confirm by editing that string directly.
This issue seems to only affect 'unique_user_value'. The 'confirmed' validation error message, which is shown when the password confirmation field does not match with the password field, is correctly translated using our custom translation.
Bug description
We are using a frontend registration form for users on one of our sites, and we wanted to change some of the translated form validation error messages to be a bit more informative/clear. However, it seems that the translation string for the validation error 'unique_user_value', which is displayed when an e-mail address is already in use, cannot be overwritten.
How to reproduce
We created a validation.php file inside lang/de_CH with the following content for testing:
`<?php
return [
];`
In config/app.php, there's the following settings (APP_FALLBACK_LOCALE is set to de_CH in the .env):
` 'locale' => 'de_CH',
Inside the control panel's sites settings, both locale and lang are set to de_CH as well. This is a single site installation.
When trying to register a user with an e-mail address that is already in use, the expected validation error message would be "4 Dieser Wert wurde bereits vergeben." from the unique_user_value translation. Instead, what is actually displayed is the de_CH translation string from inside the vendor folder, which we could test and confirm by editing that string directly.
This issue seems to only affect 'unique_user_value'. The 'confirmed' validation error message, which is shown when the password confirmation field does not match with the password field, is correctly translated using our custom translation.
Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
The text was updated successfully, but these errors were encountered: