respect-validation/docs/BoolVal.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

685 B

BoolVal

  • BoolVal()

Validates if the input results in a boolean value:

v::boolVal()->validate('on'); // true
v::boolVal()->validate('off'); // true
v::boolVal()->validate('yes'); // true
v::boolVal()->validate('no'); // true
v::boolVal()->validate(1); // true
v::boolVal()->validate(0); // true

See also: