Example #1
0
 public function validate($value)
 {
     parent::validate($value);
     if (!is_bool($value)) {
         throw new ErrorException("Value has to be boolean!");
     }
 }
Example #2
0
 public function validate($value)
 {
     parent::validate($value);
     if (!is_numeric($value)) {
         throw new ErrorException("Value has to be numeric!");
     }
 }
Example #3
0
 /**
  * Check for datatype string.
  * @param string $value
  * @throws  Exception\Error
  */
 protected function validate($value)
 {
     parent::validate($value);
     if (!is_string($value)) {
         throw new ErrorException("Value has to be text!");
     }
 }