error_msg = ':attribute field is required.'; // return false; // } $recaptcha = new ReCaptcha('6LelUOQZAAAAAHBAEnflw1XLOvCgaAeKQb4TilEb'); $resp = $recaptcha->verify($value, $_SERVER['REMOTE_ADDR']); //dd($resp); // if (!$resp->isSuccess()) { // $this->error_msg = 'ReCaptcha field is required.'; // return false; // } // if ($resp->getScore() < 0.5) { // $this->error_msg = 'Failed to validate captcha.'; // return false; // } return $resp; } public function message() { return "smth went wrong"; } }