PHPackages                             wdmg/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. wdmg/yii2-recaptcha

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

wdmg/yii2-recaptcha
===================

Google ReCaptcha widget for Yii2

1.0.2(6y ago)06MITPHP

Since Dec 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/wdmg/yii2-recaptcha)[ Packagist](https://packagist.org/packages/wdmg/yii2-recaptcha)[ Docs](https://github.com/wdmg/yii2-recaptcha)[ RSS](/packages/wdmg-yii2-recaptcha/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

[![Yii2](https://camo.githubusercontent.com/dccea8d8aeed2f3bbad8d539958795bf54a03a62c61f496084516c1b1845a9ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72657175697265642d596969325f76322e302e33332d626c75652e737667)](https://packagist.org/packages/yiisoft/yii2)[![Downloads](https://camo.githubusercontent.com/e9897a6160ace2fe1f48ab7ad59d5e1a13fa57e0534b4151a0e0aa44c7ef0e40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77646d672f796969322d7265636170746368612e737667)](https://packagist.org/packages/wdmg/yii2-recaptcha)[![Packagist Version](https://camo.githubusercontent.com/9588a76f78b3f1e9f85e6659d774ab7386298e6dcbfddfa622e6e90846879978/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77646d672f796969322d7265636170746368612e737667)](https://packagist.org/packages/wdmg/yii2-recaptcha)[![Progress](https://camo.githubusercontent.com/315c55c18b58f54e699e6de550cbbec72c9adeebced7d22e2822458e07822fb3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d696e5f646576656c6f706d656e742d7265642e737667)](https://camo.githubusercontent.com/315c55c18b58f54e699e6de550cbbec72c9adeebced7d22e2822458e07822fb3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d696e5f646576656c6f706d656e742d7265642e737667)[![GitHub license](https://camo.githubusercontent.com/91316ad78d832eb02b06133ef3d89d53953b1fc2557f40384f4d79c625c2ffe9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77646d672f796969322d7265636170746368612e737667)](https://github.com/wdmg/yii2-recaptcha/blob/master/LICENSE)

Yii2 ReCaptcha
==============

[](#yii2-recaptcha)

Google ReCaptcha widget for Yii2

Requirements
============

[](#requirements)

- PHP 5.6 or higher
- Yii2 v.2.0.33 and newest
- jQuery

Installation
============

[](#installation)

To install the widget, run the following command in the console:

`$ composer require "wdmg/yii2-recaptcha"`

Usage
=====

[](#usage)

Add in your view:

```

```

And add in your model validation rules:

```

```

Widget options
==============

[](#widget-options)

NameTypeDefaultDescriptionlanguagestring`en`See .siteKeystringnullYour public sitekey.apiURLstringnullThe URL for reCaptcha API (`//www.google.com/recaptcha/api.js` or use alternative URL if necessary '//[www.recaptcha.net/recaptcha/api.js](http://www.recaptcha.net/recaptcha/api.js)').callbacksarray\[\]Javascript callback`s for reCaptcha events.renderstring`explicit`Optional. Whether to render the widget explicitly. Defaults to onload, which will render the widget in the first g-recaptcha tag it finds..themestring`light`Optional. The color theme of the widgettypestringnullOptional. The type of CAPTCHA to serve.badgestringnullOptional. Reposition the reCAPTCHA badge. 'inline' lets you position it with CSS.sizestringnullOptional. The size of the widget. Use `invisible` value for create an invisible widget bound to a div and programmatically executed.tabIndexinteger0Optional. The tabindex of the widget and challenge. If other elements in your page use tabindex, it should be set to make user navigation easier.isolatedbooleanfalseOptional. For plugin owners to not interfere with existing reCAPTCHA installations on a page. If true, this reCAPTCHA instance will be part of a separate ID space.optionsarray\[\]Default input options.widgetOptionsarray\[\]Default widget options.> You can use the application parameters in config or in bootstrap, like `Yii::$app->params("recaptcha.siteKey") = "***"` to store the public and private key, as well as the URL to request the API and verify. Currently, the widget and validator polls the following parameters: `recaptcha.siteKey`, `recaptcha.apiURL`, `recaptcha.secretKey`, `recaptcha.verifyURL`

> This widget supports Google reCaptcha v2 in a normal and invisible way. Support for v3 is planned.

Status and version \[in progress development\]
==============================================

[](#status-and-version-in-progress-development)

- v.1.0.2 - Up to date dependencies
- v.1.0.1 - Added support for `siteKey`, `apiURL`, `secretKey`, `verifyURL` from application params.
- v.1.0.0 - First release. Added widget and validator.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Total

3

Last Release

2239d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1635637?v=4)[Alexsander Vyshnyvetskyy](/maintainers/alex-wdmg)[@alex-wdmg](https://github.com/alex-wdmg)

---

Top Contributors

[![alex-wdmg](https://avatars.githubusercontent.com/u/1635637?v=4)](https://github.com/alex-wdmg "alex-wdmg (10 commits)")

---

Tags

recaptchacaptchayii2extensionwidgetyiibootstrapwdmg

### Embed Badge

![Health badge](/badges/wdmg-yii2-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/wdmg-yii2-recaptcha/health.svg)](https://phpackages.com/packages/wdmg-yii2-recaptcha)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
