public function isValid($value) : bool { if (!preg_match($this->getPattern(), (string) $value)) { return false; } return true; }