IntType
February 3, 2026 · View on GitHub
IntType()
Validates whether the type of the input is integer.
v::intType()->assert(42);
// Validation passes successfully
v::intType()->assert('10');
// → "10" must be an integer
Templates
IntType::TEMPLATE_STANDARD
| Mode | Template |
|---|---|
default | {{subject}} must be an integer |
inverted | {{subject}} must not be an integer |
Template placeholders
| Placeholder | Description |
|---|---|
subject | The validated input or the custom validator name (if specified). |
Categorization
- Numbers
- Types
Changelog
| Version | Description |
|---|---|
| 1.0.0 | Created |