src/Validation/Rules.php
private function getTranslatedMessageFallback(string $rule, string $attribute): string
    {
        $attributeKey = "validation.attributes.$attribute";
        $attributeTranslation = trans($attributeKey);

        $attribute = $attributeTranslation === $attributeKey ? $attribute : $attributeTranslation;

        return trans("validation.{$rule}", compact('attribute'));
    }
private function getTranslatedMessageFallback(string $rule, string $attribute): string
    {
        $attributeKey = "validation.attributes.$attribute";
        $attributeTranslation = trans($attributeKey);

        $attribute = $attributeTranslation === $attributeKey ? $attribute : $attributeTranslation;

        return trans("validation.{$rule}", compact('attribute'));
    }
private function getTranslatedMessageFallback ( string $ rule , string $ attribute ) : string { $ attributeKey = "validation.attributes.$attribute" ; $ attributeTranslation = trans ( $ attributeKey ) ; $ attribute = $ attributeTranslation === $ attributeKey ? $ attribute : $ attributeTranslation ; return trans ( "validation.{$rule}" , compact ( 'attribute' ) ) ; }
If the user has not created a translation for 'mongolid_unique' rule,
this method will attempt to get the translation for 'unique' rule.
The same with 'mongolid_exists' and 'exists'.
Since it is not easy to use the framework to make this message, this
is a simple approach.
If the user has not created a translation for mongolid_unique rule this method will attempt to get the translation for unique rule . The same with mongolid_exists and exists . Since it is not easy to use the framework to make this message this is a simple approach .