mirror of
https://github.com/Respect/Validation.git
synced 2026-03-17 07:45:45 +01:00
19 lines
407 B
Markdown
19 lines
407 B
Markdown
# Countable
|
|
|
|
- `v::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
|
|
```
|
|
|
|
***
|
|
See also:
|
|
|
|
* [ArrayVal](ArrayVal.md)
|
|
* [Instance](Instance.md)
|
|
* [Iterable](Iterable.md)
|