respect-validation/docs/Countable.md
2015-10-18 17:27:25 -02:00

407 B

Countable

  • v::countable()

Validates if the input is countable, in other words, if you're allowed to use count() function on it.

v::countable()->validate([]); // true
v::countable()->validate(new ArrayObject()); // true
v::countable()->validate('string'); // false

See also: