mirror of
https://github.com/Respect/Validation.git
synced 2026-03-16 15:25:45 +01:00
They only know what message a rule produces when they try running it. Including the messages in the documentation will make it easier for people to know what to expect. There are a couple of undocumented placeholders, but I can live with that for now.
1.2 KiB
1.2 KiB
FalseVal
FalseVal()
Validates if a value is considered as false.
v::falseVal()->isValid(false); // true
v::falseVal()->isValid(0); // true
v::falseVal()->isValid('0'); // true
v::falseVal()->isValid('false'); // true
v::falseVal()->isValid('off'); // true
v::falseVal()->isValid('no'); // true
v::falseVal()->isValid('0.5'); // false
v::falseVal()->isValid('2'); // false
Templates
FalseVal::TEMPLATE_STANDARD
| Mode | Template |
|---|---|
default |
{{name}} must evaluate to false |
inverted |
{{name}} must not evaluate to false |
Template placeholders
| Placeholder | Description |
|---|---|
name |
The validated input or the custom validator name (if specified). |
Categorization
- Booleans
Changelog
| Version | Description |
|---|---|
| 1.0.0 | Renamed from False to FalseVal |
| 0.8.0 | Created as False |
See also: