Overtrue\Validation\Validator::getSizeMessage PHP Method

getSizeMessage() protected method

Get the proper error message for an attribute and size rule.
protected getSizeMessage ( string $attribute, string $rule ) : string
$attribute string
$rule string
return string
    protected function getSizeMessage($attribute, $rule)
    {
        $lowerRule = snake_case($rule);
        // There are three different types of size validations. The attribute may be
        // either a number, file, or string so we will check a few things to know
        // which type of value it is and return the correct line for that type.
        $type = $this->getAttributeType($attribute);
        $key = "validation.{$lowerRule}.{$type}";
        return $this->translator->trans($key);
    }
Validator