BoolVal()
Validates if the input results in a boolean value:
v::boolVal()->isValid('on'); // true
v::boolVal()->isValid('off'); // true
v::boolVal()->isValid('yes'); // true
v::boolVal()->isValid('no'); // true
v::boolVal()->isValid(1); // true
v::boolVal()->isValid(0); // true| Mode | Template |
|---|---|
default |
{{subject}} must be a boolean value |
inverted |
{{subject}} must not be a boolean value |
| Placeholder | Description |
|---|---|
subject |
The validated input or the custom validator name (if specified). |
- Booleans
- Types
| Version | Description |
|---|---|
| 1.0.0 | Created |
See also: