Jyxo\Input\Validator\Regex::isValid PHP Method

isValid() public method

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