PHPackages                             lg-xenos/yii2-recaptcha - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lg-xenos/yii2-recaptcha

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

lg-xenos/yii2-recaptcha
=======================

Yii2 Component-widget Google recaptcha

v1.0.1(8y ago)079PHP

Since Dec 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/lgXenos/yii2-recaptcha)[ Packagist](https://packagist.org/packages/lg-xenos/yii2-recaptcha)[ RSS](/packages/lg-xenos-yii2-recaptcha/feed)WikiDiscussions master Synced 2w ago

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

lgXenos/yii2-recaptcha
======================

[](#lgxenosyii2-recaptcha)

### Yii2 Component-widget with Google Recaptcha. Ajaxed. Multipled. Fixed

[](#yii2-component-widget-with-google-recaptcha-ajaxed-multipled-fixed)

`composer require lg-xenos/yii2-recaptcha`

```
'components' => [
    'reCaptcha' => [
        'name' => 'reCaptcha',
        'class' => 'lgxenos\yii2\recaptcha\ReCaptcha',
        // Get reCAPTCHA API keys: https://www.google.com/recaptcha/admin#createsite
        'siteKey' => 'your siteKey',
        'secret' => 'your secret key',
    ],
    ...
```

- Правила/*rules* для ActiveRecordModel / ActiveFormAdd:

```
public $reCaptcha;

public function rules()
{
  return [
      // ...
      [[], \lgxenos\yii2\recaptcha\ReCaptchaValidator::className(), 'uncheckedMessage' => 'Please confirm that you are not a bot.']
  ];
}
```

- {view}.php

```
