I am using Laravel and I did not add any code yet but I tried integrating recaptcha into laravel's auth package. I have put the script and the recaptcha shows up at the form already. I also put validation so that the recaptcha is required. However, when I submit the form with recaptcha it throws that error. Here is my register controller from auth package:
protected function validator(array $data)
{
return Validator::make($data, [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:8', 'confirmed'],
'g-recaptcha-response' => ['required|captcha']
]);
}