function Assert::notRegex
@psalm-pure
Parameters
string $value:
string $pattern:
string $message:
Throws
File
-
vendor/
webmozart/ assert/ src/ Assert.php, line 1178
Class
- Assert
- Efficient assertions to validate the input/output of your methods.
Namespace
Webmozart\AssertCode
public static function notRegex($value, $pattern, $message = '') {
if (\preg_match($pattern, $value, $matches, PREG_OFFSET_CAPTURE)) {
static::reportInvalidArgument(\sprintf($message ?: 'The value %s matches the pattern %s (at offset %d).', static::valueToString($value), static::valueToString($pattern), $matches[0][1]));
}
}