respect-validation/docs/rules/NoneOf.md

35 lines
493 B
Markdown
Raw Normal View History

2015-01-30 09:40:06 +01:00
# NoneOf
- `NoneOf(Validatable ...$rule)`
2015-01-30 09:40:06 +01:00
Validates if NONE of the given validators validate:
```php
v::noneOf(
2015-10-07 16:46:57 +02:00
v::intVal(),
2015-10-07 16:42:37 +02:00
v::floatVal()
)->validate('foo'); // true
2015-01-30 09:40:06 +01:00
```
In the sample above, 'foo' isn't a integer nor a float, so noneOf returns true.
## Categorization
- Composite
- Nesting
## Changelog
Version | Description
--------|-------------
0.3.9 | Created
***
2015-01-30 09:40:06 +01:00
See also:
- [AllOf](AllOf.md)
- [AnyOf](AnyOf.md)
- [Not](Not.md)
- [OneOf](OneOf.md)
2018-12-11 13:31:50 +01:00
- [When](When.md)