function UploadedFileInterface::validate

Same name in other branches
  1. 10 core/modules/file/src/Upload/UploadedFileInterface.php \Drupal\file\Upload\UploadedFileInterface::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.

2 methods override UploadedFileInterface::validate()
FormUploadedFile::validate in core/modules/file/src/Upload/FormUploadedFile.php
Validates the uploaded file information.
InputStreamUploadedFile::validate in core/modules/file/src/Upload/InputStreamUploadedFile.php
Validates the uploaded file information.

File

core/modules/file/src/Upload/UploadedFileInterface.php, line 75

Class

UploadedFileInterface
Provides an interface for uploaded files.

Namespace

Drupal\file\Upload

Code

public function validate(ValidatorInterface $validator, array $options = []) : ConstraintViolationListInterface;

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