Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.51 KB

File metadata and controls

59 lines (42 loc) · 1.51 KB

Countable

  • Countable()

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

Templates

Countable::TEMPLATE_STANDARD

Mode Template
default {{subject}} must be countable
inverted {{subject}} must not be countable

Template placeholders

Placeholder Description
subject The validated input or the custom validator name (if specified).

Categorization

  • Types

Changelog

Version Description
3.0.0 Templates changed
1.0.0 Created from ArrayVal

See Also