public function rule_bool($a)
{
// We don't use PHP inbuilt test - a bit restrictive
// Changes PHP true/false to 1, 0
$a = strtolower($a);
$vals = array('true', 'false', 't', 'f', 1, 0, 'yes', 'no', 'y', 'n');
if (!in_array($a, $vals)) {
return $this->fail('Must be a boolean value');
}
}