diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php
index 3bee330..022a345 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/BundleConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Checks if a value is a valid entity type.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "Bundle",
  *   label = @Translation("Bundle", context = "Validation"),
  *   type = { "entity", "entity_reference" }
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraint.php
index 8a5f319..2a73455 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraint.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityChangedConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Validation constraint for the entity changed timestamp.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "EntityChanged",
  *   label = @Translation("Entity changed", context = "Validation"),
  *   type = {"entity"}
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityTypeConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityTypeConstraint.php
index df25b6c..62194c4 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityTypeConstraint.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityTypeConstraint.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\Core\Entity\Constraint\EntityTypeConstraint.
+ * Contains \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityTypeConstraint.
  */
 
 namespace Drupal\Core\Entity\Plugin\Validation\Constraint;
@@ -12,7 +12,7 @@
 /**
  * Checks if a value is a valid entity type.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "EntityType",
  *   label = @Translation("Entity type", context = "Validation"),
  *   type = { "entity", "entity_reference" }
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php
index d38827a..74bc0cc 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ReferenceAccessConstraint.php
@@ -14,7 +14,7 @@
  *
  * Verifies that referenced entities are valid.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "ReferenceAccess",
  *   label = @Translation("Entity Reference reference access", context = "Validation")
  * )
diff --git a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ValidReferenceConstraint.php b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ValidReferenceConstraint.php
index 2a7d6a9..d982193 100644
--- a/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ValidReferenceConstraint.php
+++ b/core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ValidReferenceConstraint.php
@@ -14,7 +14,7 @@
  *
  * Verifies that referenced entities are valid.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "ValidReference",
  *   label = @Translation("Entity Reference valid reference", context = "Validation")
  * )
diff --git a/core/lib/Drupal/Core/Validation/Annotation/Constraint.php b/core/lib/Drupal/Core/Validation/Annotation/Constraint.php
new file mode 100644
index 0000000..4010e76
--- /dev/null
+++ b/core/lib/Drupal/Core/Validation/Annotation/Constraint.php
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Validation\Annotation\Constraint.
+ */
+
+namespace Drupal\Core\Validation\Annotation;
+
+use Drupal\Component\Annotation\Plugin;
+
+/**
+ * Defines a validation constraint annotation object.
+ *
+ * Plugin Namespace: Plugin\Validation\Constraint
+ *
+ * For a working example, see \Drupal\Core\Validation\Plugin\Validation\Constraint\LengthConstraint
+ *
+ * @see \Drupal\Core\Validation\ConstraintManager
+ * @see \Symfony\Component\Validator\Constraint
+ * @see hook_validation_constraint_alter()
+ * @see plugin_api
+ *
+ * @Annotation
+ */
+class Constraint extends Plugin {
+
+  /**
+   * The constraint plugin ID.
+   *
+   * The plugin ID usually resembles the class name without the "Constraint"
+   * suffix.
+   *
+   * @var string
+   */
+  public $id;
+
+  /**
+   * The human-readable name of the constraint plugin.
+   *
+   * @ingroup plugin_translatable
+   *
+   * @var \Drupal\Core\Annotation\Translation
+   */
+  public $label;
+
+  /**
+   * An array of data type IDs for which this constraint applies. Valid values
+   * are any types registered by the typed data API, or an array of multiple
+   * type names. For supporting all types, FALSE may be specified. The key
+   * defaults to an empty array, i.e. no types are supported.
+   *
+   * @var string|string[]|false
+   *
+   * @see \Drupal\Core\TypedData\Annotation\DataType
+   */
+  public $type = array();
+
+}
diff --git a/core/lib/Drupal/Core/Validation/ConstraintManager.php b/core/lib/Drupal/Core/Validation/ConstraintManager.php
index 0ed8d97..da1f13a 100644
--- a/core/lib/Drupal/Core/Validation/ConstraintManager.php
+++ b/core/lib/Drupal/Core/Validation/ConstraintManager.php
@@ -26,10 +26,10 @@
  * module would have to prefix any constraints with "Profile".
  *
  * Constraint plugins may specify data types to which support is limited via the
- * 'type' key of plugin definitions. Valid values are any types registered via
- * the typed data API, or an array of multiple type names. For supporting all
- * types FALSE may be specified. The key defaults to an empty array, i.e. no
- * types are supported.
+ * 'type' key of plugin definitions. See
+ * \Drupal\Core\Validation\Annotation\Constraint for details.
+ *
+ * @see \Drupal\Core\Validation\Annotation\Constraint
  */
 class ConstraintManager extends DefaultPluginManager {
 
@@ -45,7 +45,7 @@ class ConstraintManager extends DefaultPluginManager {
    *   The module handler to invoke the alter hook with.
    */
   public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
-    parent::__construct('Plugin/Validation/Constraint', $namespaces, $module_handler);
+    parent::__construct('Plugin/Validation/Constraint', $namespaces, $module_handler, NULL, 'Drupal\Core\Validation\Annotation\Constraint');
     $this->discovery = new StaticDiscoveryDecorator($this->discovery, array($this, 'registerDefinitions'));
     $this->alterInfo('validation_constraint');
     $this->setCacheBackend($cache_backend, 'validation_constraint_plugins');
@@ -106,10 +106,7 @@ public function registerDefinitions() {
    */
   public function processDefinition(&$definition, $plugin_id) {
     // Make sure 'type' is set and either an array or FALSE.
-    if (!isset($definition['type'])) {
-      $definition['type'] = array();
-    }
-    elseif ($definition['type'] !== FALSE && !is_array($definition['type'])) {
+    if ($definition['type'] !== FALSE && !is_array($definition['type'])) {
       $definition['type'] = array($definition['type']);
     }
   }
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php
index 939fbab..b8381fd 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraint.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Contains \Drupal\Core\Validation\Constraint\AllowedValuesConstraint.
+ * Contains \Drupal\Core\Validation\Plugin\Validation\Constraint\AllowedValuesConstraint.
  */
 
 namespace Drupal\Core\Validation\Plugin\Validation\Constraint;
@@ -12,7 +12,7 @@
 /**
  * Checks for the value being allowed.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "AllowedValues",
  *   label = @Translation("Allowed values", context = "Validation")
  * )
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ComplexDataConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ComplexDataConstraint.php
index c9638ae..0c7d0e0 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ComplexDataConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ComplexDataConstraint.php
@@ -14,7 +14,7 @@
  *
  * Validates properties of complex data structures.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "ComplexData",
  *   label = @Translation("Complex data", context = "Validation")
  * )
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/CountConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/CountConstraint.php
index 77836a7..270d0d7 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/CountConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/CountConstraint.php
@@ -14,7 +14,7 @@
  *
  * Overrides the symfony constraint to use Drupal-style replacement patterns.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "Count",
  *   label = @Translation("Count", context = "Validation"),
  *   type = { "list" }
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php
index 905d1b6..48a6f99 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php
@@ -14,7 +14,7 @@
  *
  * Overrides the symfony constraint to use the strict setting.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "Email",
  *   label = @Translation("Email", context = "Validation")
  * )
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/LengthConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/LengthConstraint.php
index f8b34b4..308afd1 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/LengthConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/LengthConstraint.php
@@ -16,7 +16,7 @@
  *
  * @todo: Move this below the TypedData core component.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "Length",
  *   label = @Translation("Length", context = "Validation"),
  *   type = { "string" }
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php
index 9b745ae..ec4569c 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/NotNullConstraint.php
@@ -14,7 +14,7 @@
  *
  * Overrides the symfony constraint to handle empty Typed Data structures.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "NotNull",
  *   label = @Translation("NotNull", context = "Validation"),
  *   type = false
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraint.php
index 1d9ca3c..e8f1dd3 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Supports validating all primitive types.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "PrimitiveType",
  *   label = @Translation("Primitive type", context = "Validation")
  * )
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php
index c35b64f..298f59c 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RangeConstraint.php
@@ -16,7 +16,7 @@
  *
  * @todo: Move this below the TypedData core component.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "Range",
  *   label = @Translation("Range", context = "Validation"),
  *   type = { "integer", "float" }
diff --git a/core/modules/aggregator/src/Plugin/Validation/Constraint/FeedTitleConstraint.php b/core/modules/aggregator/src/Plugin/Validation/Constraint/FeedTitleConstraint.php
index 47d16ac..a8e71a2 100644
--- a/core/modules/aggregator/src/Plugin/Validation/Constraint/FeedTitleConstraint.php
+++ b/core/modules/aggregator/src/Plugin/Validation/Constraint/FeedTitleConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Supports validating feed titles.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "FeedTitle",
  *   label = @Translation("Feed title", context = "Validation")
  * )
diff --git a/core/modules/aggregator/src/Plugin/Validation/Constraint/FeedUrlConstraint.php b/core/modules/aggregator/src/Plugin/Validation/Constraint/FeedUrlConstraint.php
index 0e2ce1d..cf41dee 100644
--- a/core/modules/aggregator/src/Plugin/Validation/Constraint/FeedUrlConstraint.php
+++ b/core/modules/aggregator/src/Plugin/Validation/Constraint/FeedUrlConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Supports validating feed URLs.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "FeedUrl",
  *   label = @Translation("Feed URL", context = "Validation")
  * )
diff --git a/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php b/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php
index 4de6726..572192c 100644
--- a/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php
+++ b/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Supports validating comment author names.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "CommentName",
  *   label = @Translation("Comment author name", context = "Validation"),
  *   type = "entity:comment"
diff --git a/core/modules/field/tests/modules/field_test/src/Plugin/Validation/Constraint/TestFieldConstraint.php b/core/modules/field/tests/modules/field_test/src/Plugin/Validation/Constraint/TestFieldConstraint.php
index 61d7b20..fc57564 100644
--- a/core/modules/field/tests/modules/field_test/src/Plugin/Validation/Constraint/TestFieldConstraint.php
+++ b/core/modules/field/tests/modules/field_test/src/Plugin/Validation/Constraint/TestFieldConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Checks if a value is not equal.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "TestField",
  *   label = @Translation("Test Field", context = "Validation"),
  *   type = { "integer" }
diff --git a/core/modules/forum/src/Plugin/Validation/Constraint/ForumLeafConstraint.php b/core/modules/forum/src/Plugin/Validation/Constraint/ForumLeafConstraint.php
index 0f6312b..ad60d8e 100644
--- a/core/modules/forum/src/Plugin/Validation/Constraint/ForumLeafConstraint.php
+++ b/core/modules/forum/src/Plugin/Validation/Constraint/ForumLeafConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Checks that the node is assigned only a "leaf" term in the forum taxonomy.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "ForumLeaf",
  *   label = @Translation("Forum leaf", context = "Validation"),
  * )
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php
index 31ba7b3..64984a6 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Defines an access validation constraint for links.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "LinkAccess",
  *   label = @Translation("Link URI can be accessed by the user.", context = "Validation"),
  * )
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php
index 881c66e..aa98f06 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Defines a protocol validation constraint for links to external URLs.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "LinkExternalProtocols",
  *   label = @Translation("No dangerous external protocols", context = "Validation"),
  * )
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php
index 3bcbb98..e97cd46 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Defines a protocol validation constraint for links to broken internal URLs.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "LinkNotExistingInternal",
  *   label = @Translation("No broken internal links", context = "Validation"),
  * )
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
index 79a6e28..bc5d72b 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
@@ -15,7 +15,7 @@
 /**
  * Validation constraint for links receiving data allowed by its settings.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "LinkType",
  *   label = @Translation("Link data valid for link type.", context = "Validation"),
  * )
diff --git a/core/modules/system/core.api.php b/core/modules/system/core.api.php
index a156905..19e1694 100644
--- a/core/modules/system/core.api.php
+++ b/core/modules/system/core.api.php
@@ -1970,6 +1970,19 @@ function hook_config_schema_info_alter(&$definitions) {
 }
 
 /**
+ * Alter validation constraint plugin definitions.
+ *
+ * @param array[] $definitions
+ *   The array of validation constraint definitions, keyed by plugin ID.
+ *
+ * @see \Drupal\Core\Validation\ConstraintManager
+ * @see \Drupal\Core\Validation\Annotation\Constraint
+ */
+function hook_validation_constraint_alter(array &$definitions) {
+  $definitions['Null']['class'] = '\Drupal\mymodule\Validator\Constraints\MyClass';
+}
+
+/**
  * @} End of "addtogroup hooks".
  */
 
diff --git a/core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraint.php b/core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraint.php
index ea2f448..4e5cede 100644
--- a/core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraint.php
+++ b/core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/FieldWidgetConstraint.php
@@ -11,7 +11,7 @@
 /**
  * Supports validating widget constraints.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "FieldWidgetConstraint",
  *   label = @Translation("Field widget constraint.")
  * )
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php b/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
index fd3ca3d..2d2e837 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Checks if the plain text password is provided for editing a protected field.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "ProtectedUserField",
  *   label = @Translation("Password required for protected field change", context = "Validation")
  * )
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
index f463c3a..0a6b8e9 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
@@ -19,7 +19,7 @@
  * and the user performing the edit has 'administer users' permission.
  * This allows users without email address to be edited and deleted.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "UserMailRequired",
  *   label = @Translation("User email required", context = "Validation")
  * )
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php b/core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php
index e541518..210e00c 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailUnique.php
@@ -12,7 +12,7 @@
 /**
  * Checks if a user's email address is unique on the site.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "UserMailUnique",
  *   label = @Translation("User email unique", context = "Validation")
  * )
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php b/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
index 381d3cf..70c0bc7 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
@@ -12,7 +12,7 @@
 /**
  * Checks if a value is a valid user name.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "UserName",
  *   label = @Translation("User name", context = "Validation"),
  * )
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php b/core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php
index 0a65d32..286d340 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php
@@ -12,7 +12,7 @@
 /**
  * Checks if a user name is unique on the site.
  *
- * @Plugin(
+ * @Constraint(
  *   id = "UserNameUnique",
  *   label = @Translation("User name unique", context = "Validation"),
  * )
