Laravel Version
11
PHP Version
8.2
Database Driver & Version
No response
Description
The getCustomMessageFromTranslator function is using custom logic to check for translation messages instead of leveraging the translator's has() function.
This behavior causes an error when checking if a translation exists within the get function. Replacing this logic with the has() function would standardize the check and prevent such errors.
Reference: Laravel source
Steps To Reproduce
$request->validate([
'name' => 'required|string|max:255',
'email' => 'required|email:rfc,dns|max:255|unique:users',
]);
Calling translator get() instead of translator has().