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| Mode | Template |
|---|---|
default |
{{subject}} must be an array |
inverted |
{{subject}} must not be an array |
| Placeholder | Description |
|---|---|
subject |
The validated input or the custom validator name (if specified). |
- Arrays
- Types
| Version | Description |
|---|---|
| 1.0.0 | Created |