MediaTestConstraint.php in Drupal 8
Same filename and directory in other branches
File
core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.phpView 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
Name | Description |
---|---|
MediaTestConstraint | A media test constraint. |