function isValid() { $this->fieldID = $this->property_info['id']; if (!isset($_FILES[$this->fieldID]['name']) || $_FILES[$this->fieldID]['name'] == '') { return true; } $upload_manager = new SJB_UploadFileManager(); if (!empty($this->property_info['max_file_size'])) { $upload_manager->setMaxFileSize($this->property_info['max_file_size']); } else { $upload_manager->setMaxFileSize(SJB_UploadFileManager::getIniUploadMaxFilesize()); } if ($this->getComplexParent()) { $upload_manager->isValidUploadedFile($this->getComplexParent(), $this->property_info['id']); } else { if ($upload_manager->isValidUploadedFile($this->property_info['id'])) { return true; } } return $upload_manager->getError(); }