respect-validation/docs/ArrayVal.md
Henrique Moody 2a2e1d577e
Change how documentation of rules are presented
Rules are not always used from the alias `v`, neither called staticaly.
2017-03-27 17:26:21 +02:00

23 lines
516 B
Markdown

# ArrayVal
- `ArrayVal()`
Validates if the input is an array or if the input can be used as an array
(instance of `ArrayAccess` or `SimpleXMLElement`).
```php
v::arrayVal()->validate([]); // true
v::arrayVal()->validate(new ArrayObject); // true
v::arrayVal()->validate(new SimpleXMLElement($xml)); // true
```
***
See also:
* [ArrayType](ArrayType.md)
* [Countable](Countable.md)
* [Each](Each.md)
* [IterableType](IterableType.md)
* [Key](Key.md)
* [KeySet](KeySet.md)
* [KeyValue](KeyValue.md)