mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 15:25:45 +01:00
22 lines
354 B
Markdown
22 lines
354 B
Markdown
# Subset
|
|
|
|
- `Subset(array $superset)`
|
|
|
|
Validates whether the input is a subset of a given value.
|
|
|
|
```php
|
|
v::subset([1, 2, 3])->validate([1, 2]); // true
|
|
v::subset([1, 2])->validate([1, 2, 3]); // false
|
|
```
|
|
|
|
## Changelog
|
|
|
|
Version | Description
|
|
--------|-------------
|
|
2.0.0 | Created
|
|
|
|
***
|
|
See also:
|
|
|
|
- [ArrayType](ArrayType.md)
|
|
- [ArrayVal](ArrayVal.md)
|