Exemple #1
0
 public function validate()
 {
     $retval = true;
     foreach ($this->data as $data) {
         foreach ($data as $key => $dat) {
             $data[$this->templateName . "." . $key . "[]"] = $dat;
         }
         $this->clearErrors();
         $this->template->setData($data);
         $retval = $this->template->validate();
     }
     return $retval;
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function validate()
 {
     $this->valid = true;
     $value = $this->val();
     if (!empty($value) && !isset($this[$value])) {
         $this->error(static::$error_message);
         return $this->valid = false;
     }
     return parent::validate();
 }