function UploadedFile::isValid
Returns whether the file has been uploaded with HTTP and no error occurred.
2 calls to UploadedFile::isValid()
- UploadedFile::move in vendor/
symfony/ psr-http-message-bridge/ Factory/ UploadedFile.php - Moves the file to a new location.
- UploadedFile::move in vendor/
symfony/ http-foundation/ File/ UploadedFile.php - Moves the file to a new location.
File
-
vendor/
symfony/ http-foundation/ File/ UploadedFile.php, line 169
Class
- UploadedFile
- A file uploaded through a form.
Namespace
Symfony\Component\HttpFoundation\FileCode
public function isValid() : bool {
$isOk = \UPLOAD_ERR_OK === $this->error;
return $this->test ? $isOk : $isOk && is_uploaded_file($this->getPathname());
}