2015-01-30 09:40:06 +01:00
|
|
|
# Regex
|
|
|
|
|
2017-03-27 14:47:07 +02:00
|
|
|
- `Regex(string $regex)`
|
2015-01-30 09:40:06 +01:00
|
|
|
|
2018-09-09 02:26:22 +02:00
|
|
|
Validates whether the input matches a defined regular expression.
|
2015-01-30 09:40:06 +01:00
|
|
|
|
|
|
|
```php
|
2015-10-20 02:53:25 +02:00
|
|
|
v::regex('/[a-z]/')->validate('a'); // true
|
2015-01-30 09:40:06 +01:00
|
|
|
```
|
|
|
|
|
2018-09-09 02:26:22 +02:00
|
|
|
Message template for this validator includes `{{regex}}`.
|
2015-10-20 02:53:25 +02:00
|
|
|
|
2019-05-11 18:32:13 +02:00
|
|
|
## Categorization
|
|
|
|
|
|
|
|
- Strings
|
|
|
|
|
2017-03-27 22:04:13 +02:00
|
|
|
## Changelog
|
|
|
|
|
|
|
|
Version | Description
|
|
|
|
--------|-------------
|
|
|
|
0.3.9 | Created
|
|
|
|
|
2015-10-20 02:53:25 +02:00
|
|
|
***
|
|
|
|
See also:
|
|
|
|
|
2017-03-28 11:53:14 +02:00
|
|
|
- [Alnum](Alnum.md)
|
|
|
|
- [Alpha](Alpha.md)
|
|
|
|
- [Contains](Contains.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [CreditCard](CreditCard.md)
|
2020-10-05 12:49:14 +02:00
|
|
|
- [Decimal](Decimal.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [Digit](Digit.md)
|
|
|
|
- [EndsWith](EndsWith.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [PhpLabel](PhpLabel.md)
|
|
|
|
- [Roman](Roman.md)
|
2017-03-28 11:53:14 +02:00
|
|
|
- [StartsWith](StartsWith.md)
|
2018-12-11 13:31:50 +01:00
|
|
|
- [Version](Version.md)
|