ArrayType
Validates whether the type of an input is array.
v::arrayType()->assert([]);
// Validation passes successfully
v::arrayType()->assert([1, 2, 3]);
// Validation passes successfully
v::arrayType()->assert(new ArrayObject());
// → `ArrayObject { getArrayCopy() => [] }` must be an array
Templates
ArrayType::TEMPLATE_STANDARD
| Mode |
Template |
default |
{{subject}} must be an array |
inverted |
{{subject}} must not be an array |
Template placeholders
| Placeholder |
Description |
subject |
The validated input or the custom validator name (if specified). |
Categorization
Changelog
| Version |
Description |
| 1.0.0 |
Created |
See Also