summaryrefslogtreecommitdiffstats
path: root/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php')
-rw-r--r--core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php b/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php
index 575a393..d387542 100644
--- a/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php
+++ b/core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraint.php
@@ -19,6 +19,25 @@ use Symfony\Component\Validator\Constraint;
*/
class CommentNameConstraint extends Constraint {
- public $message = '%name belongs to a registered user.';
+ /**
+ * Message shown when an anonymous user comments using a registered name.
+ *
+ * @var string
+ */
+ public $messageNameTaken = 'The name you used (%name) belongs to a registered user.';
+
+ /**
+ * Message shown when an admin changes the comment-author to an invalid user.
+ *
+ * @var string
+ */
+ public $messageRequired = 'You have to specify a valid author.';
+
+ /**
+ * Message shown when the name doesn't match the author's name.
+ *
+ * @var string
+ */
+ public $messageMatch = 'The specified author name does not match the comment author.';
}