tao-test/app/vendor/respect/validation/docs/rules/TrueVal.md

24 lines
490 B
Markdown
Raw Normal View History

2022-08-29 20:14:13 +02:00
# TrueVal
- `v::trueVal()`
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
```
***
See also:
* [BoolType](BoolType.md)
* [BoolVal](BoolVal.md)
* [FalseVal](FalseVal.md)