CallableType
Validates whether the pseudo-type of the input is callable.
v::callableType()->assert(function () {});
// Validation passes successfully
v::callableType()->assert('trim');
// Validation passes successfully
v::callableType()->assert([new DateTime(), 'format']);
// Validation passes successfully
Templates
CallableType::TEMPLATE_STANDARD
| Mode |
Template |
default |
{{subject}} must be a callable function |
inverted |
{{subject}} must not be a callable function |
Template placeholders
| Placeholder |
Description |
subject |
The validated input or the custom validator name (if specified). |
Categorization
Changelog
| Version |
Description |
| 1.0.0 |
Created |
See Also