- /**
- * @param $value
- * @param CRM_Core_Form $form
- *
- * @return mixed
- */
- static function validate($value, $form) {
- $config = CRM_Core_Config::singleton();
-
- $resp = recaptcha_check_answer($config->recaptchaPrivateKey,
- $_SERVER['REMOTE_ADDR'],
- $_POST["recaptcha_challenge_field"],
- $_POST["recaptcha_response_field"]
- );
- return $resp->is_valid;
- }