diff --git a/src/CliProgram/Validation/Validators/RegexValidator.php b/src/CliProgram/Validation/Validators/RegexValidator.php index 24ac8b7..a940c89 100644 --- a/src/CliProgram/Validation/Validators/RegexValidator.php +++ b/src/CliProgram/Validation/Validators/RegexValidator.php @@ -35,7 +35,7 @@ class RegexValidator implements IValidator { * @inheritDoc */ public function validate (mixed $value): bool { - return preg_match($this->pattern, $value, $this->matches) === 1; + return preg_match($this->pattern, $value ?? '', $this->matches) === 1; } /**