diff --git a/core/validator/rule/isfile.php b/core/validator/rule/isfile.php index 37a03b9..a2385ad 100644 --- a/core/validator/rule/isfile.php +++ b/core/validator/rule/isfile.php @@ -29,6 +29,11 @@ class Rule_IsFile extends Rule_Abstract return false; } + if ($_FILES[$this->field]['error'] == UPLOAD_ERR_INI_SIZE) { + $this->setErrorMsg('Превышен размер файла'); + return false; + } + $tmp = $_FILES[$this->field]; if (!in_array($tmp['type'], $this->type)) { $this->setErrorMsg('Неверный формат файла');