code: public function validate($value){
  		$empty=false;
  
  		try{
  			$empty=$this->getOption('empty');
  		}
  		catch(ValueNotFoundException $e){
  			//ignore
  		}
  
  		if((!$value || $value=='false') && $empty){
  			return null;
  		}
  
  		if(!in_array($value, array('true','on',true))){
  			return "Invalid value.";
  		}
  
  		return null;
  	}
docs: {@inheritdoc}