MediaTestConstraint.php

Same filename in other branches
  1. 8.9.x core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php
  2. 10 core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php
  3. 11.x core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php

Namespace

Drupal\media_test_source\Plugin\Validation\Constraint

File

core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php

View source
<?php

namespace Drupal\media_test_source\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * A media test constraint.
 *
 * @Constraint(
 *   id = "MediaTestConstraint",
 *   label = @Translation("Media constraint for test purposes.", context = "Validation"),
 *   type = { "entity", "string" }
 * )
 */
class MediaTestConstraint extends Constraint {
    
    /**
     * The default violation message.
     *
     * @var string
     */
    public $message = 'Inappropriate text.';

}

Classes

Title Deprecated Summary
MediaTestConstraint A media test constraint.

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