Version 1
[yaffs-website] / web / core / modules / link / src / Plugin / Validation / Constraint / LinkNotExistingInternalConstraint.php
diff --git a/web/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php b/web/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php
new file mode 100644 (file)
index 0000000..01d4a04
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+namespace Drupal\link\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraint;
+
+/**
+ * Defines a protocol validation constraint for links to broken internal URLs.
+ *
+ * @Constraint(
+ *   id = "LinkNotExistingInternal",
+ *   label = @Translation("No broken internal links", context = "Validation"),
+ * )
+ */
+class LinkNotExistingInternalConstraint extends Constraint {
+
+  public $message = "The path '@uri' is invalid.";
+
+}