respect-validation/docs/rules/Regex.md

37 lines
606 B
Markdown
Raw Permalink Normal View History

2015-01-30 09:40:06 +01:00
# Regex
- `Regex(string $regex)`
2015-01-30 09:40:06 +01:00
Validates whether the input matches a defined regular expression.
2015-01-30 09:40:06 +01:00
```php
v::regex('/[a-z]/')->validate('a'); // true
2015-01-30 09:40:06 +01:00
```
Message template for this validator includes `{{regex}}`.
## Categorization
- Strings
## Changelog
Version | Description
--------|-------------
0.3.9 | Created
***
See also:
- [Alnum](Alnum.md)
- [Alpha](Alpha.md)
- [Contains](Contains.md)
2018-12-11 13:31:50 +01:00
- [CreditCard](CreditCard.md)
- [Decimal](Decimal.md)
- [Digit](Digit.md)
- [EndsWith](EndsWith.md)
2018-12-11 13:31:50 +01:00
- [PhpLabel](PhpLabel.md)
- [Roman](Roman.md)
- [StartsWith](StartsWith.md)
2018-12-11 13:31:50 +01:00
- [Version](Version.md)