예제 #1
0
파일: UniElement.php 프로젝트: 9naQuame/wyf
 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;
 }
예제 #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();
 }