mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 23:35:45 +01:00
21 lines
378 B
Markdown
21 lines
378 B
Markdown
# Regex
|
|
|
|
- `v::regex(string $regex)`
|
|
|
|
Evaluates a regex on the input and validates if matches
|
|
|
|
```php
|
|
v::regex('/[a-z]/')->validate('a'); // true
|
|
```
|
|
|
|
Message template for this validator includes `{{regex}}`
|
|
|
|
***
|
|
See also:
|
|
|
|
* [Alnum](Alnum.md)
|
|
* [Alpha](Alpha.md)
|
|
* [Contains](Contains.md)
|
|
* [Digit](Digit.md)
|
|
* [EndsWith](EndsWith.md)
|
|
* [StartsWith](StartsWith.md)
|