BoolType

February 3, 2026 ยท View on GitHub

  • BoolType()

Validates whether the type of the input is boolean.

v::boolType()->assert(true);
// Validation passes successfully

v::boolType()->assert(false);
// Validation passes successfully

Templates

BoolType::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must be a boolean
inverted{{subject}} must not be a boolean

Template placeholders

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

Categorization

  • Booleans
  • Types

Changelog

VersionDescription
1.0.0Renamed from Bool to BoolType
0.3.9Created as Bool

See Also