mirror of
https://github.com/Respect/Validation.git
synced 2024-06-04 14:52:17 +02:00
10df3211f5
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
31 lines
556 B
Markdown
31 lines
556 B
Markdown
# Countable
|
|
|
|
- `Countable()`
|
|
|
|
Validates if the input is countable, in other words, if you're allowed to use
|
|
[count()](http://php.net/count) function on it.
|
|
|
|
```php
|
|
v::countable()->validate([]); // true
|
|
v::countable()->validate(new ArrayObject()); // true
|
|
v::countable()->validate('string'); // false
|
|
```
|
|
|
|
## Categorization
|
|
|
|
- Types
|
|
|
|
## Changelog
|
|
|
|
Version | Description
|
|
--------|-------------
|
|
1.0.0 | Created from `ArrayVal`
|
|
|
|
***
|
|
See also:
|
|
|
|
- [ArrayType](ArrayType.md)
|
|
- [ArrayVal](ArrayVal.md)
|
|
- [Instance](Instance.md)
|
|
- [IterableType](IterableType.md)
|