Back

Google reCaptcha always resetting with laravel 5.1


I've searched about it on internet but it seems to be different. I'm using laravel5.1 and implemented google recaptcha. The scenario is, if the form was submitted and returns the validation with error, the recaptcha is resetting again and again, what I want is to not to reset it again, just staying as validated, because it annoys users to validate again and again. Do you have any idea about this?

Code:

public function postRegister(Request $request){
    // Validation
    $this->validate($request, [
        'username' => 'required|unique:users|max:20|min:3',
        'password' => 'required|min:6',
        'retype_password' => 'required|same:password',
        'email' => 'required|unique:users|email|max:255',
        'g-recaptcha-response' => 'required|recaptcha'
    ]);

    // Database save part here...

    return redirect()->route('register')->with('info', 'Success!');
}

Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us