public function validateValue($attribute, $val)
 {
     if ($this->functionObj->paramType === NULL) {
         return false;
     }
     switch ($this->functionObj->paramType) {
         case 'integer':
             if (!is_int($val)) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} must be integer'));
                 return false;
             }
             break;
         case 'numeric':
             if (!is_numeric($val)) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} must be numeric'));
                 return false;
             }
             break;
         case 'string':
             if (!is_string($val)) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} must be string'));
                 return false;
             }
             break;
         case 'in':
             if (!isset($this->config['values']) || !is_array($this->config['values']) || !array_key_exists($val, $this->config['values'])) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} is not within declared values'));
                 return false;
             }
             break;
         case 'date':
             if (isset(Yii::$app->params['dateFormat']) && !\DateTime::createFromformat(Yii::$app->params['dateFormat'], $val)) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} must be date of format {format}', ['format' => Yii::$app->params['dateFormat']]));
                 return false;
             } elseif (!new \DateTime($val)) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} must be date'));
                 return false;
             }
             break;
         case 'date range':
             $dates = split(' - ', $val);
             if (count($dates) !== 2) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} must contain two date separated by " - "'));
                 return false;
             } elseif (isset(Yii::$app->params['dateFormat']) && !(\DateTime::createFromformat(Yii::$app->params['dateFormat'], $dates[0]) && \DateTime::createFromformat(Yii::$app->params['dateFormat'], $dates[1]))) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} must be date of format {format}', ['format' => Yii::$app->params['dateFormat']]));
                 return false;
             } elseif (!new \DateTime($dates[0]) || !new \DateTime($dates[1])) {
                 $this->addError($attribute, Yii::t('reportmanager', '{attribute} must be date'));
                 return false;
             }
             break;
     }
     return true;
 }