function InputStreamUploadedFile::validate

Same name and namespace in other branches
  1. 11.x core/modules/file/src/Upload/InputStreamUploadedFile.php \Drupal\file\Upload\InputStreamUploadedFile::validate()

Validates the uploaded file information.

Parameters

\Symfony\Component\Validator\Validator\ValidatorInterface $validator: A validator object.

array $options: Options to pass to a constraint.

Return value

\Symfony\Component\Validator\ConstraintViolationListInterface The list of violations.

Overrides UploadedFileInterface::validate

File

core/modules/file/src/Upload/InputStreamUploadedFile.php, line 83

Class

InputStreamUploadedFile
An uploaded file from an input stream.

Namespace

Drupal\file\Upload

Code

public function validate(ValidatorInterface $validator, array $options = []) : ConstraintViolationListInterface {
    return new ConstraintViolationList();
}

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