Overtrue\Validation\Validator::validateMax PHP Method

validateMax() protected method

Validate the size of an attribute is less than a maximum value.
protected validateMax ( string $attribute, mixed $value, array $parameters ) : boolean
$attribute string
$value mixed
$parameters array
return boolean
    protected function validateMax($attribute, $value, $parameters)
    {
        $this->requireParameterCount(1, $parameters, 'max');
        if (!empty($value['tmp_name']) && is_uploaded_file($value['tmp_name']) && $value['error']) {
            return false;
        }
        return $this->getSize($attribute, $value) <= $parameters[0];
    }
Validator