You are here

public function DropzoneJsUploadSaveInterface::validateFile in DropzoneJS 8

Same name and namespace in other branches
  1. 8.2 src/DropzoneJsUploadSaveInterface.php \Drupal\dropzonejs\DropzoneJsUploadSaveInterface::validateFile()

Validate the uploaded file.

Parameters

\Drupal\file\FileInterface $file: The file entity object.

string $extensions: A space separated string of valid extensions.

array $additional_validators: An optional, associative array of callback functions used to validate the file. See file_validate() for more documentation. Note that we add file_validate_extensions and file_validate_name_length in this method already.

Return value

array An array containing validation error messages.

1 method overrides DropzoneJsUploadSaveInterface::validateFile()
DropzoneJsUploadSave::validateFile in src/DropzoneJsUploadSave.php
Validate the uploaded file.

File

src/DropzoneJsUploadSaveInterface.php, line 56

Class

DropzoneJsUploadSaveInterface
Provides an interface for classes that save DropzoneJs uploads.

Namespace

Drupal\dropzonejs

Code

public function validateFile(FileInterface $file, $extensions, array $additional_validators = []);