You are here

MediaTestConstraint.php in Drupal 9

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

Namesort descending Description
MediaTestConstraint A media test constraint.