Control

February 3, 2026 ยท View on GitHub

  • Control()
  • Control(string ...$additionalChars)

Validates if all of the characters in the provided string, are control characters.

v::control()->assert("\n\r\t");
// Validation passes successfully

Templates

Control::TEMPLATE_STANDARD

ModeTemplate
default{{subject}} must consist only of control characters
inverted{{subject}} must not consist only of control characters

Control::TEMPLATE_EXTRA

ModeTemplate
default{{subject}} must consist only of control characters or {{additionalChars}}
inverted{{subject}} must not consist only of control characters or {{additionalChars}}

Template placeholders

PlaceholderDescription
additionalCharsAdditional characters that are considered valid.
subjectThe validated input or the custom validator name (if specified).

Categorization

  • Strings

Changelog

VersionDescription
3.0.0Templates changed
2.0.0Renamed from Cntrl to Control
0.5.0Created

See Also