Skip to content

Commit b7d24b5

Browse files
committed
Fix label validator
1 parent c255139 commit b7d24b5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Database/Validator/Label.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
class Label extends Key
66
{
7-
protected string $message = 'Value must be a valid string between 1 and ' . self::KEY_MAX_LENGTH . ' chars containing only alphanumeric chars';
7+
public function __construct(bool $allowInternal = false, int $maxLength = 255)
8+
{
9+
parent::__construct($allowInternal, $maxLength);
10+
$this->message = 'Value must be a valid string between 1 and ' . $this->maxLength . ' chars containing only alphanumeric chars';
11+
}
812

913
/**
1014
* Is valid.

0 commit comments

Comments
 (0)