Version 1
[yaffs-website] / web / core / modules / link / src / Plugin / Validation / Constraint / LinkTypeConstraint.php
diff --git a/web/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php b/web/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
new file mode 100644 (file)
index 0000000..52171d6
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+namespace Drupal\link\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraint;
+
+/**
+ * Validation constraint for links receiving data allowed by its settings.
+ *
+ * @Constraint(
+ *   id = "LinkType",
+ *   label = @Translation("Link data valid for link type.", context = "Validation"),
+ * )
+ */
+class LinkTypeConstraint extends Constraint {
+
+  public $message = "The path '@uri' is invalid.";
+
+}