original_string: public function validate()
      {
          // Delete the file when requested
          if (true === $this->enableReset && $this->getPost($this->strName.'_reset')) {
              if (null !== ($fileModel = FilesModel::findByPk($this->varValue))) {
                  $file = new File($fileModel->path);
                  $file->delete();
              }
  
              unset($_FILES[$this->strName]);
  
              return;
          }
  
          // Handle file upload
          parent::validate();
  
          // Set the image as varValue
          $file = $_SESSION['FILES'][$this->strName];
          if (true === $file['uploaded']) {
              $this->varValue = StringUtil::uuidToBin($file['uuid']);
          } else {
              $this->blnSubmitInput = false;
          }
      }
code: public function validate()
      {
          // Delete the file when requested
          if (true === $this->enableReset && $this->getPost($this->strName.'_reset')) {
              if (null !== ($fileModel = FilesModel::findByPk($this->varValue))) {
                  $file = new File($fileModel->path);
                  $file->delete();
              }
  
              unset($_FILES[$this->strName]);
  
              return;
          }
  
          // Handle file upload
          parent::validate();
  
          // Set the image as varValue
          $file = $_SESSION['FILES'][$this->strName];
          if (true === $file['uploaded']) {
              $this->varValue = StringUtil::uuidToBin($file['uuid']);
          } else {
              $this->blnSubmitInput = false;
          }
      }
code_tokens: public function validate ( ) { // Delete the file when requested if ( true === $ this -> enableReset && $ this -> getPost ( $ this -> strName . '_reset' ) ) { if ( null !== ( $ fileModel = FilesModel :: findByPk ( $ this -> varValue ) ) ) { $ file = new File ( $ fileModel -> path ) ; $ file -> delete ( ) ; } unset ( $ _FILES [ $ this -> strName ] ) ; return ; } // Handle file upload parent :: validate ( ) ; // Set the image as varValue $ file = $ _SESSION [ 'FILES' ] [ $ this -> strName ] ; if ( true === $ file [ 'uploaded' ] ) { $ this -> varValue = StringUtil :: uuidToBin ( $ file [ 'uuid' ] ) ; } else { $ this -> blnSubmitInput = false ; } }
docstring: Validate the user input and set the value.
  
  @throws \Exception
docstring_tokens: Validate the user input and set the value .