Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / Validation / Plugin / Validation / Constraint / UuidConstraint.php
diff --git a/web/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UuidConstraint.php b/web/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UuidConstraint.php
new file mode 100644 (file)
index 0000000..bf2e223
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\Core\Validation\Plugin\Validation\Constraint;
+
+use Symfony\Component\Validator\Constraints\Uuid;
+use Symfony\Component\Validator\Constraints\UuidValidator;
+
+/**
+ * Validates a UUID.
+ *
+ * @Constraint(
+ *   id = "Uuid",
+ *   label = @Translation("Universally Unique Identifier", context = "Validation"),
+ * )
+ */
+class UuidConstraint extends Uuid {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function validatedBy() {
+    return UuidValidator::class;
+  }
+
+}