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