Esempio n. 1
0
 /**
  * Clear result if nothing has been submitted
  */
 public function validate()
 {
     parent::validate();
     if (!isset($_POST[$this->strName])) {
         $this->varValue = '';
     }
 }
 /**
  * Check for a valid option (see #4383)
  */
 public function validate()
 {
     $varValue = $this->getPost($this->strName);
     if (!empty($varValue) && !$this->isValidOption($varValue)) {
         $this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['invalid'], is_array($varValue) ? implode(', ', $varValue) : $varValue));
     }
     parent::validate();
 }
Esempio n. 3
0
 /**
  * Check for a valid option (see #4383)
  */
 public function validate()
 {
     $varValue = deserialize($this->getPost($this->strName));
     if ($varValue != '' && !$this->isValidOption($varValue)) {
         $this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['invalid'], $varValue));
     }
     parent::validate();
 }
 /**
  * Check for a valid option (see #4383)
  */
 public function validate()
 {
     $varValue = deserialize($this->getPost($this->strName));
     // validation deactivated for editing reasons
     // 		if ($varValue != '' && !$this->isValidOption($varValue))
     // 		{
     // 			$this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['invalid'], $varValue));
     // 		}
     parent::validate();
 }
Esempio n. 5
0
 /**
  * Clear result if nothing has been submitted
  */
 public function validate()
 {
     parent::validate();
     // Workaround for key sorting in DataContainer ~line 285
     $i = 0;
     foreach ($this->varValue as $k => $v) {
         if (!$v['enabled']) {
             unset($this->varValue[$k]);
             continue;
         }
         $this->varValue[$k]['position'] = $i++;
     }
 }