Validates if the input is countable, in other words, if you're allowed to use
count() function on it.
v::countable()->assert([]);
// Validation passes successfully
v::countable()->assert(new ArrayObject());
// Validation passes successfully
v::countable()->assert('string');
// → "string" must be countable
| Mode | Template |
|---|
default | {{subject}} must be countable |
inverted | {{subject}} must not be countable |
| Placeholder | Description |
|---|
subject | The validated input or the custom validator name (if specified). |
| Version | Description |
|---|
| 3.0.0 | Templates changed |
| 1.0.0 | Created from ArrayVal |