22 lines
342 B
PHP
22 lines
342 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Lucent\Validator;
|
||
|
|
|
||
|
|
use Lucent\Validator\Validator;
|
||
|
|
|
||
|
|
|
||
|
|
class Uid
|
||
|
|
{
|
||
|
|
public string $value;
|
||
|
|
function __construct(string $value)
|
||
|
|
{
|
||
|
|
Validator::single("Uid", $value, "required|alpha_dash|min:2|max:50");
|
||
|
|
$this->value = $value;
|
||
|
|
}
|
||
|
|
|
||
|
|
function value(): string
|
||
|
|
{
|
||
|
|
return $this->value;
|
||
|
|
}
|
||
|
|
}
|