Returns whether the file was uploaded successfully.
@api
Boolean True if the file has been uploaded with HTTP and no error occurred.
public function isValid() {
$isOk = $this->error === UPLOAD_ERR_OK;
return $this->test ? $isOk : $isOk && is_uploaded_file($this
->getPathname());
}