function validate() { parent::validate(); if (!count($this->mQueries)) { $this->addErrorMessage(_MD_LEGACY_ERROR_SEARCH_QUERY_REQUIRED); } }
function validate() { parent::validate(); if (!$this->get('is_pm') && !$this->get('is_mail')) { $this->addErrorMessage(_AD_USER_ERROR_MAILJOB_SEND_MEANS); } }
/** * execute. * * @return Enum */ public function execute() { if ($this->mObject == null) { return $this->_getFrameViewStatus('ERROR'); } if ($this->mRoot->mContext->mRequest->getRequest('_form_control_cancel') != null) { return $this->_getFrameViewStatus('CANCEL'); } $this->mActionForm->load($this->mObject); $this->mActionForm->fetch(); $this->mActionForm->validate(); if ($this->mActionForm->hasError()) { return $this->_getFrameViewStatus('INPUT'); } $this->mActionForm->update($this->mObject); return $this->_doExecute(); }
function validate() { parent::validate(); // // If htmlbanner is clicked, htmlbanner is requreid. // if ($this->get('htmlbanner')) { if (strlen($this->get('htmlcode')) == 0) { $this->addErrorMessage(XCube_Utils::formatString(_AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_HTMLCODE)); } } else { if (strlen($this->get('imageurl')) == 0) { $this->addErrorMessage(XCube_Utils::formatString(_AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_IMAGEURL)); } if (strlen($this->get('clickurl')) == 0) { $this->addErrorMessage(XCube_Utils::formatString(_AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_CLICKURL)); } } }
function validate() { parent::validate(); $handler =& xoops_getmodulehandler('imagecategory', 'legacy'); $category =& $handler->get($this->get('imgcat_id')); $formFile = $this->get('image_name'); if ($formFile != null && is_object($category)) { // // Imagefile width & height check. // if ($formFile->getWidth() > $category->get('imgcat_maxwidth') || $formFile->getHeight() > $category->get('imgcat_maxheight')) { $this->addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_IMG_SIZE, $category->get('imgcat_maxwidth'), $category->get('imgcat_maxheight'))); } // // Check file size // if ($formFile->getFilesize() > $category->get('imgcat_maxsize')) { $this->addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACY_ERROR_IMG_FILESIZE, $category->get('imgcat_maxsize'))); } } }
/** * Validate input data. * * @param void * * @return void **/ public function validate() { parent::validate(); /** * Xcck.Event.ValidateRegisterForm * * @param &Xcck_PageEditForm **/ XCube_DelegateUtils::call('Module.' . $this->mDirname . '.ValidateRegisterForm', $this); }