예제 #1
0
 /**
  * Validate input and set value
  * We call the parent (FormFileUpload) if user has JavaScript disabled
  */
 public function validate()
 {
     if ($this->mandatory) {
         if (!$_SESSION['FILES'] || !count($_SESSION['FILES'])) {
             $this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['mandatory'], $this->strLabel));
         }
         $this->mandatory = false;
     }
     // Call parent validate() to upload files without javascript.
     return parent::validate();
 }