respect-validation/docs/rules/Uuid.md

32 lines
606 B
Markdown
Raw Normal View History

2017-05-16 10:59:55 +02:00
# Uuid
- `Uuid()`
- `Uuid(int $version)`
2017-05-16 10:59:55 +02:00
Validates whether the input is a valid UUID. It also supports validation of
specific versions 1, 3, 4 and 5.
2017-05-16 10:59:55 +02:00
```php
v::uuid()->validate('Hello World!'); // false
v::uuid()->validate('eb3115e5-bd16-4939-ab12-2b95745a30f3'); // true
v::uuid(1)->validate('eb3115e5-bd16-4939-ab12-2b95745a30f3'); // false
v::uuid(4)->validate('eb3115e5-bd16-4939-ab12-2b95745a30f3'); // true
2017-05-16 10:59:55 +02:00
```
## Categorization
- Strings
2017-05-16 10:59:55 +02:00
## Changelog
Version | Description
--------|-------------
2.0.0 | Created
***
See also:
2018-12-11 13:31:50 +01:00
- [Base](Base.md)
- [Decimal](Decimal.md)
2018-12-11 13:31:50 +01:00
- [Digit](Digit.md)