summaryrefslogtreecommitdiff
path: root/app/Elements/AbstractElement.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Elements/AbstractElement.php')
-rw-r--r--app/Elements/AbstractElement.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/Elements/AbstractElement.php b/app/Elements/AbstractElement.php
index a70c9d4eb1..7101c3154e 100644
--- a/app/Elements/AbstractElement.php
+++ b/app/Elements/AbstractElement.php
@@ -52,7 +52,8 @@ abstract class AbstractElement implements ElementInterface
protected const REGEX_URL = '~((https?|ftp]):)(//([^\s/?#<>]*))?([^\s?#<>]*)(\?([^\s#<>]*))?(#[^\s?#<>]+)?~';
// HTML attributes for an <input>
- protected const MAX_LENGTH = false;
+ protected const MAXIMUM_LENGTH = false;
+ protected const PATTERN = false;
// Which child elements can appear under this element.
protected const SUBTAGS = [];
@@ -144,7 +145,8 @@ abstract class AbstractElement implements ElementInterface
'id' => $id,
'name' => $name,
'value' => $value,
- 'maxvalue' => static::MAX_LENGTH,
+ 'maxvalue' => static::MAXIMUM_LENGTH,
+ 'pattern' => static::PATTERN,
];
return '<input ' . Html::attributes($attributes) . '">';