diff --git a/system/validation/message.php b/system/validation/message.php index 50d93746..34fc95a1 100644 --- a/system/validation/message.php +++ b/system/validation/message.php @@ -88,6 +88,17 @@ private static function get_rangable_message($rule) */ private static function get_upload_of_message($rule) { + // --------------------------------------------------------- + // Upload_Of rules sometimes set a "presence_of" error. + // + // This occurs when the uploaded file didn't exist and the + // "not_required" method was not called. + // --------------------------------------------------------- + if ($rule->error == 'presence_of') + { + return static::get_message($rule); + } + // --------------------------------------------------------- // Slice "file_" off of the error type. // ---------------------------------------------------------