PHPackages                             baha2odeh/yii2-recaptcha-v3 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. baha2odeh/yii2-recaptcha-v3

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

baha2odeh/yii2-recaptcha-v3
===========================

Yii2 reCAPTCHA v3

v1.2(6y ago)363.8k↓16.1%15[4 issues](https://github.com/Baha2Odeh/yii2-recaptcha-v3/issues)Apache-2.0PHP

Since Dec 22Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Baha2Odeh/yii2-recaptcha-v3)[ Packagist](https://packagist.org/packages/baha2odeh/yii2-recaptcha-v3)[ RSS](/packages/baha2odeh-yii2-recaptcha-v3/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Yii2 reCAPTCHA v3
=================

[](#yii2-recaptcha-v3)

Yii2 reCAPTCHA v3

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist baha2odeh/yii2-recaptcha-v3 "*"

```

or add

```
"baha2odeh/yii2-recaptcha-v3": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

add this to your components main.php

```
'components' => [
        ...
        'recaptchaV3' => [
            'class' => 'Baha2Odeh\RecaptchaV3\RecaptchaV3',
            'site_key' => '###',
            'secret_key' => '###',
            'verify_ssl' => true, // default is true
        ],
```

and in your model

acceptance\_score the minimum score for this request (0.0 - 1.0) or null

```
public $code;

 public function rules(){
 	return [
 		...
 		 [['code'], RecaptchaV3Validator::className(), 'acceptance_score' => null]
 	];
    }
```

```
