Esempio n. 1
0
 public function validate($value)
 {
     parent::validate($value);
     if (!is_bool($value)) {
         throw new ErrorException("Value has to be boolean!");
     }
 }
Esempio n. 2
0
 public function validate($value)
 {
     parent::validate($value);
     if (!is_numeric($value)) {
         throw new ErrorException("Value has to be numeric!");
     }
 }
Esempio n. 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!");
     }
 }