FileIsImageConstraint.php

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

Namespace

Drupal\file\Plugin\Validation\Constraint

File

core/modules/file/src/Plugin/Validation/Constraint/FileIsImageConstraint.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 is image constraint.
 */
class FileIsImageConstraint extends SymfonyConstraint {
    
    /**
     * The error message.
     *
     * @var string
     */
    public string $message = 'The image file is invalid or the image type is not allowed. Allowed types: %types';

}

Classes

Title Deprecated Summary
FileIsImageConstraint File is image constraint.

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