function FormUploadedFile::isValid
Returns whether the file was uploaded successfully.
Return value
bool TRUE if the file has been uploaded with HTTP and no error occurred.
Overrides UploadedFileInterface::isValid
File
- 
              core/
modules/ file/ src/ Upload/ FormUploadedFile.php, line 42  
Class
- FormUploadedFile
 - Provides a bridge to Symfony UploadedFile.
 
Namespace
Drupal\file\UploadCode
public function isValid() : bool {
  @trigger_error(__METHOD__ . '() is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use \\Drupal\\file\\Validation\\UploadedFileValidatorInterface::validate() instead. See https://www.drupal.org/node/3375456', E_USER_DEPRECATED);
  return $this->uploadedFile
    ->isValid();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.