function checkAnswers($aItems, $iLenMin, $iLenMax) { if (count($aItems) < 2) { return false; } return parent::checkLength($aItems, $iLenMin, $iLenMax); }
function checkLengthTranslatable($sVal, $iLenMin, $iLenMax, $aName, $sMethod = BX_DOL_STUDIO_METHOD_DEFAULT, $bAll = true) { if (empty($sMethod) || empty($aName)) { return false; } $aLanguages = BxDolStudioLanguagesUtils::getInstance()->getLanguages(); foreach ($aLanguages as $sLangName => $sLangTitle) { $sValue = BxDolForm::getSubmittedValue($aName . '-' . $sLangName, $sMethod); $bValue = parent::checkLength($sValue, $iLenMin, $iLenMax); if ($bAll && !$bValue) { return false; } if (!$bAll && $bValue) { return true; } } return $bAll ? true : false; }