protected function ValidateUserData()
    {
        $bIsValid = true;

        $oMsgManager = TCMSMessageManager::GetInstance();

        // check user data
        $sCaptchaValue = $this->GetCaptchaValue();
        if (empty($sCaptchaValue) || $sCaptchaValue != $this->aUserInput['captcha']) {
            $bIsValid = false;
            $oMsgManager->AddMessage('tell-a-friend-field-captcha', 'INPUT-ERROR-INVALID-CAPTCHA');
        }
        $aRequiredFields = $this->RequiredFields();
        foreach ($aRequiredFields as $sFieldName) {
            $sVal = trim($this->aUserInput[$sFieldName]);
            if (empty($sVal)) {
                $bIsValid = false;
                $oMsgManager->AddMessage('tell-a-friend-field-'.$sFieldName, 'ERROR-USER-REQUIRED-FIELD-MISSING');
            }
        }

        return $bIsValid;
    }