AdminPageFrameworkLoader_AdminPage_Help_Report_Report::validate PHP Метод

validate() публичный Метод

Validates the submitted form data.
С версии: 3.5.4
public validate ( $aInput, $aOldInput, $oFactory, $aSubmit )
    public function validate($aInput, $aOldInput, $oFactory, $aSubmit)
    {
        // Local variables
        $_bIsValid = true;
        $_aErrors = array();
        if (!$aInput['allow_sending_system_information']) {
            $_bIsValid = false;
            $_aErrors['allow_sending_system_information'] = __('We need necessary information to help you.', 'admin-page-framework-loader');
        }
        if (!$_bIsValid) {
            $oFactory->setFieldErrors($_aErrors);
            $oFactory->setSettingNotice(__('Please help us to help you.', 'admin-page-framework-loader'));
            return $aOldInput;
        }
        // Otherwise, process the data.
        return $aInput;
    }
AdminPageFrameworkLoader_AdminPage_Help_Report_Report