Neos\Flow\Validation\Validator\RegularExpressionValidator::isValid PHP Method

isValid() protected method

Checks if the given value matches the specified regular expression.
protected isValid ( mixed $value ) : void
$value mixed The value that should be validated
return void
    protected function isValid($value)
    {
        $result = preg_match($this->options['regularExpression'], $value);
        if ($result === 0) {
            $this->addError('The given subject did not match the pattern. Got: %1$s', 1221565130, [$value]);
        }
        if ($result === false) {
            throw new InvalidValidationOptionsException('regularExpression "' . $this->options['regularExpression'] . '" in RegularExpressionValidator contained an error.', 1298273089);
        }
    }
RegularExpressionValidator