summaryrefslogtreecommitdiffstats
path: root/core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php')
-rw-r--r--core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php b/core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php
new file mode 100644
index 0000000..3d466b3
--- /dev/null
+++ b/core/modules/media/tests/modules/media_test_source/src/Plugin/Validation/Constraint/MediaTestConstraint.php
@@ -0,0 +1,25 @@
+<?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.';
+
+}