public function validate($aInputs, $aOldInputs, $oAdminPage)
{
$_bIsValid = true;
$_aErrors = array();
// You can check the passed values with the log() method of the oDebug object.
// $this->oDebug->log( $aInputs );
// $this->oDebug->log( $aOldInputs );
// Validate the submitted data.
if (strlen(trim($aInputs['metabox_text_field'])) < 3) {
$_aErrors['metabox_text_field'] = __('The entered text is too short! Type more than 2 characters.', 'admin-page-framework-loader') . ': ' . $aInputs['metabox_text_field'];
$_bIsValid = false;
}
if (!$_bIsValid) {
$this->setFieldErrors($_aErrors);
$this->setSettingNotice(__('There was an error in your input in meta box form fields', 'admin-page-framework-loader'));
return $aOldInputs;
}
return $aInputs;
}