respect-validation/docs/TrueVal.md
Henrique Moody 2a2e1d577e
Change how documentation of rules are presented
Rules are not always used from the alias `v`, neither called staticaly.
2017-03-27 17:26:21 +02:00

433 B

TrueVal

  • TrueVal()

Validates if a value is considered as true.

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: