respect-validation/docs/rules/Callback.md
2018-08-23 02:12:44 +02:00

26 lines
412 B
Markdown

# Callback
- `Callback(callable $callback)`
Validates the input using the return of a given callable.
```php
v::callback(
function (int $input): bool {
return $input + ($input / 2) == 15;
}
)->validate(10); // true
```
## Changelog
Version | Description
--------|-------------
0.3.9 | Created
***
See also:
- [Call](Call.md)
- [CallableType](CallableType.md)
- [FilterVar](FilterVar.md)