FileExtensionSecureConstraint.php

Same filename in other branches
  1. 11.x core/modules/file/src/Plugin/Validation/Constraint/FileExtensionSecureConstraint.php

Namespace

Drupal\file\Plugin\Validation\Constraint

File

core/modules/file/src/Plugin/Validation/Constraint/FileExtensionSecureConstraint.php

View source
<?php

declare (strict_types=1);
namespace Drupal\file\Plugin\Validation\Constraint;

use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;

/**
 * File extension secure constraint.
 */
class FileExtensionSecureConstraint extends SymfonyConstraint {
    
    /**
     * The error message.
     *
     * @var string
     */
    public string $message = 'For security reasons, your upload has been rejected.';

}

Classes

Title Deprecated Summary
FileExtensionSecureConstraint File extension secure constraint.

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