Overtrue\Validation\Validator::getInlineMessage PHP Method

getInlineMessage() protected method

Get the inline message for a rule if it exists.
protected getInlineMessage ( string $attribute, string $lowerRule, array $source = null ) : string
$attribute string
$lowerRule string
$source array
return string
    protected function getInlineMessage($attribute, $lowerRule, $source = null)
    {
        $source = $source ?: $this->customMessages;
        $keys = ["{$attribute}.{$lowerRule}", $lowerRule];
        // First we will check for a custom message for an attribute specific rule
        // message for the fields, then we will check for a general custom line
        // that is not attribute specific. If we find either we'll return it.
        foreach ($keys as $key) {
            if (isset($source[$key])) {
                return $source[$key];
            }
        }
    }
Validator