public function UploadedFile::isValid

Returns whether the file was uploaded successfully.

@api

Return value

Boolean True if no error occurred during uploading

1 call to UploadedFile::isValid()
UploadedFile::move in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php
Moves the file to a new location.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/File/UploadedFile.php, line 173

Class

UploadedFile
A file uploaded through a form.

Namespace

Symfony\Component\HttpFoundation\File

Code

public function isValid() {
  return $this->error === UPLOAD_ERR_OK;
}