public function Validate() { if ($this->file == null) { return; } $this->isValid = !$this->file->IsError(); if (!$this->IsValid()) { Log::Debug('Uploaded file %s is not valid. %s', $this->file->OriginalName(), $this->file->Error()); $this->AddMessage($this->file->Error()); } }