summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'MLEB/Translate/src/Validation/Validators/MediaWikiParameterValidator.php')
-rw-r--r--MLEB/Translate/src/Validation/Validators/MediaWikiParameterValidator.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/MLEB/Translate/src/Validation/Validators/MediaWikiParameterValidator.php b/MLEB/Translate/src/Validation/Validators/MediaWikiParameterValidator.php
new file mode 100644
index 00000000..5c953b4c
--- /dev/null
+++ b/MLEB/Translate/src/Validation/Validators/MediaWikiParameterValidator.php
@@ -0,0 +1,17 @@
+<?php
+declare( strict_types = 1 );
+
+namespace MediaWiki\Extension\Translate\Validation\Validators;
+
+/**
+ * An insertable wiki parameter validator that also acts as an InsertableSuggester
+ * @license GPL-2.0-or-later
+ * @since 2019.12
+ */
+class MediaWikiParameterValidator extends InsertableRegexValidator {
+ public function __construct() {
+ parent::__construct( '/\$[1-9]/' );
+ }
+}
+
+class_alias( MediaWikiParameterValidator::class, '\MediaWiki\Extensions\Translate\MediaWikiParameterValidator' );