<?php
class Core_Validate_File_Uploaded extends Core_Validate_File_Abstract
{
    protected $_errorMessage = 'Datoteka je nužna';

    protected function _isValid($fileUpload)
    {
        if (!($fileUpload instanceof Core_Form_Upload)) {
            throw new Exception(sprintf('Value passed to validator %s must be an instance of Core_Form_Upload'), __CLASS__);
        }
        $this->setValue($fileUpload);

        // upload OK?
        return $fileUpload->isValid();
    }
}