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
| Mode | Template |
|---|
default | {{subject}} must be a callable function |
inverted | {{subject}} must not be a callable function |
| Placeholder | Description |
|---|
subject | The validated input or the custom validator name (if specified). |
| Version | Description |
|---|
| 1.0.0 | Created |