CallableType

February 3, 2026 ยท View on GitHub

  • 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

ModeTemplate
default{{subject}} must be a callable function
inverted{{subject}} must not be a callable function

Template placeholders

PlaceholderDescription
subjectThe validated input or the custom validator name (if specified).

Categorization

  • Callables
  • Types

Changelog

VersionDescription
1.0.0Created

See Also