interface UploadedFileValidatorInterface

Same name in other branches
  1. 11.x core/modules/file/src/Validation/UploadedFileValidatorInterface.php \Drupal\file\Validation\UploadedFileValidatorInterface

Validator for uploaded files.

Hierarchy

Expanded class hierarchy of UploadedFileValidatorInterface

All classes that implement UploadedFileValidatorInterface

File

core/modules/file/src/Validation/UploadedFileValidatorInterface.php, line 13

Namespace

Drupal\file\Validation
View source
interface UploadedFileValidatorInterface {
    
    /**
     * Validates an uploaded file.
     *
     * @param \Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile
     *   The uploaded file.
     * @param array $options
     *   An array of options accepted by
     *   \Drupal\file\Validation\Constraint\UploadedFileConstraint.
     *
     * @return \Symfony\Component\Validator\ConstraintViolationListInterface
     *   The constraint violation list.
     */
    public function validate(UploadedFile $uploadedFile, array $options = []) : ConstraintViolationListInterface;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
UploadedFileValidatorInterface::validate public function Validates an uploaded file. 1

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.