StringType

February 3, 2026 ยท View on GitHub

  • StringType()

Validates whether the type of an input is string or not.

v::stringType()->assert('hi');
// Validation passes successfully

Templates

StringType::TEMPLATE_STANDARD

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

Template placeholders

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

Categorization

  • Strings
  • Types

Changelog

VersionDescription
1.0.0Renamed from String to StringType
0.3.9Created as String

See Also