function FormUploadedFile::isValid

Same name in other branches
  1. 9 core/modules/file/src/Upload/FormUploadedFile.php \Drupal\file\Upload\FormUploadedFile::isValid()

Overrides UploadedFileInterface::isValid

File

core/modules/file/src/Upload/FormUploadedFile.php, line 42

Class

FormUploadedFile
Provides a bridge to Symfony UploadedFile.

Namespace

Drupal\file\Upload

Code

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.