Open Alexrubl opened 7 years ago
@Alexrubl You Can use
captcha: grecaptcha.getResponse(),
in your ajax submit data and then get captcha data
How to validate them?
@lukaszog You want to validate google captcha throw ajax ? it depends on witch framework that you use ? i used this package in laravel
No, I would like to validate captcha using laravel 5 when cpatcha is sending by ajax using captcha: grecaptcha.getResponse()
@lukaszog you have to write validation rule inside your laravel Request like :
return Validator::make($data, [ 'g-recaptcha-response' => 'required|captcha',
@emtized Note: if you're sending captcha: grecaptcha.getResponse()
,then on server side you should also be looking for return Validator::make($data, [ 'captcha' => 'required|captcha',
, not 'g-recaptcha-response
@emtized Note: if you're sending captcha: grecaptcha.getResponse() ,then on server side you should also be looking for return Validator::make($data, [ 'captcha' => 'required|captcha', , not 'g-recaptcha-response
@neorganic Yes you're right id depends on your code , i just sent my info with this name in Ajax Thanks dude
And how with ajax it all to use? Writes that reCaptcha ID empty. I need to add ajax to submit