protected function getCaptchaControl()
{
$control = $this->getValidationTarget();
if (!$control) {
throw new Exception('No target control specified for TReCaptchaValidator');
}
if (!$control instanceof TReCaptcha) {
throw new Exception('TReCaptchaValidator only works with TReCaptcha controls');
}
return $control;
}