Version 1
[yaffs-website] / web / modules / contrib / video_embed_field / src / Plugin / Validation / Constraint / VideoEmbedConstraint.php
diff --git a/web/modules/contrib/video_embed_field/src/Plugin/Validation/Constraint/VideoEmbedConstraint.php b/web/modules/contrib/video_embed_field/src/Plugin/Validation/Constraint/VideoEmbedConstraint.php
new file mode 100644 (file)
index 0000000..aeef70f
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+
+namespace Drupal\video_embed_field\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraint;
+
+/**
+ * Validation constraint for the video embed field.
+ *
+ * @Constraint(
+ *   id = "VideoEmbedValidation",
+ *   label = @Translation("VideoEmbed provider constraint", context = "Validation"),
+ * )
+ */
+class VideoEmbedConstraint extends Constraint {
+
+  /**
+   * Message shown when a video provider is not found.
+   *
+   * @var string
+   */
+  public $message = 'Could not find a video provider to handle the given URL.';
+
+}