class FileEncodingConstraint

Defines an encoding constraint for files.

Hierarchy

  • class \Drupal\file\Plugin\Validation\Constraint\FileEncodingConstraint extends \Symfony\Component\Validator\Constraint

Expanded class hierarchy of FileEncodingConstraint

File

core/modules/file/src/Plugin/Validation/Constraint/FileEncodingConstraint.php, line 14

Namespace

Drupal\file\Plugin\Validation\Constraint
View source
class FileEncodingConstraint extends SymfonyConstraint {
    
    /**
     * The error message.
     *
     * @var string
     */
    public string $message = "The file is encoded with %detected. It must be encoded with %encoding";
    
    /**
     * The allowed file encodings.
     *
     * @var array
     */
    public array $encodings;

}

Members

Title Sort descending Modifiers Object type Summary
FileEncodingConstraint::$encodings public property The allowed file encodings.
FileEncodingConstraint::$message public property The error message.

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