respect-validation/docs/rules/TrueVal.md

35 lines
643 B
Markdown
Raw Normal View History

2015-10-07 16:38:24 +02:00
# TrueVal
- `TrueVal()`
2015-10-07 16:38:24 +02:00
Validates if a value is considered as `true`.
```php
v::trueVal()->validate(true); // true
v::trueVal()->validate(1); // true
v::trueVal()->validate('1'); // true
v::trueVal()->validate('true'); // true
v::trueVal()->validate('on'); // true
v::trueVal()->validate('yes'); // true
v::trueVal()->validate('0.5'); // false
v::trueVal()->validate('2'); // false
2015-10-07 16:38:24 +02:00
```
## Categorization
- Booleans
## Changelog
Version | Description
--------|-------------
1.0.0 | Renamed from `True` to `TrueVal`
0.8.0 | Created as `True`
2015-10-07 16:38:24 +02:00
***
See also:
2018-12-11 13:31:50 +01:00
- [BoolType](BoolType.md)
- [BoolVal](BoolVal.md)
- [FalseVal](FalseVal.md)