captcha icon indicating copy to clipboard operation
captcha copied to clipboard

Add second parameters,I would like to repeat the verification

Open yljphp opened this issue 8 years ago • 3 comments

Add second parameters

if ( ! function_exists('captcha_check')) {
    /**
     * @param $value
     * @return bool
     */
    function captcha_check($value , $del = true)
    {
        return app('captcha')->check($value,$del);
    }
}

    public function check($value , $del = true)
    {
        if ( ! $this->session->has('captcha'))
        {
            return false;
        }

        $key = $this->session->get('captcha.key');

        if ( ! $this->session->get('captcha.sensitive'))
        {
            $value = $this->str->lower($value);
        }
        if($del){
            $this->session->remove('captcha');
        }

        return $this->hasher->check($value, $key);
    }

yljphp avatar Apr 12 '16 02:04 yljphp

What is the purpose of this?

mewebstudio avatar Apr 26 '16 13:04 mewebstudio

Verify two times. one for ajax, two for php

yljphp avatar Apr 27 '16 06:04 yljphp

in Request validation, laravel 5.2 laravel will call check two times, after another attribute validate failed.

acczefly avatar Sep 22 '16 13:09 acczefly