PHPackages                             redcodede/captcha - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. redcodede/captcha

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

redcodede/captcha
=================

Human-friendly captcha addon for Statamic forms

v1.3.3(2mo ago)041MITPHPPHP ^8.2

Since Sep 8Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/redcodede/captcha)[ Packagist](https://packagist.org/packages/redcodede/captcha)[ RSS](/packages/redcodede-captcha/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (6)Versions (8)Used By (0)

Captcha
=======

[](#captcha)

> Captcha is a Statamic addon that makes a classic captcha available for Statamic forms.

Features
--------

[](#features)

This addon does:

- Provide Captcha Image
- Provide Tags to use in your Forms

Accessibility Notice
--------------------

[](#accessibility-notice)

Please note that this captcha requires vision to solve. This captcha provides an image with a 4-character string that needs to be entered in the coresponding form field.

How to Install
--------------

[](#how-to-install)

You can search for this addon in the `Tools > Addons` section of the Statamic control panel and click **install**, or run the following command from your project root:

```
composer require redcodede/captcha
```

How to Use
----------

[](#how-to-use)

### 1. Install the addon

[](#1-install-the-addon)

Install the Captcha addon into your Statamic project as described in **How to Install**.

### 2. Add new validation rule

[](#2-add-new-validation-rule)

To use the Captcha in your form you need to add a new validation rule. Do this by running `php artisan make:rule VerifyCaptcha` in your terminal.

The new rule should contain these methods:

`public function passes($attribute, mixed $value): bool{    try {        if (strtolower($_SESSION['phrase']) === strtolower($value)) {            Captcha::refreshCaptcha();            return true;        } else {            return false;        }    } catch(\Exception $e) {        return false;    }}``public function message(): string{return '__(validation.verify_captcha)';}`

The message handles the error messages you may want to define in resources &gt; lang.

**Extending App Service Provider**Extending the App Service Provider is no longer necessary.

### 4. Add your form field

[](#4-add-your-form-field)

Your form needs to contain a text form field with the validation rules `required` and `captcha`.

### 5. Include the captcha into your form template

[](#5-include-the-captcha-into-your-form-template)

The form template should include the `{{ refresh_captcha }}` tag to generate a new captcha on reloading the form to get a fresh one every time.

Your form field template should include an img tag with the src of `{{ captcha_image }}`. This that will provide you with the image URL.

You can also add a button which will let the user generate another captcha image. `generate new captcha image`

Now you should be all set to use the Captcha on your own Website.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance86

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~31 days

Total

7

Last Release

67d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.2

v1.3.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/dee806941a8c70b255168eee70c771159b34930bdd467803a61ded7571e8280a?d=identicon)[lwoschke](/maintainers/lwoschke)

---

Top Contributors

[![lwoschke](https://avatars.githubusercontent.com/u/69637693?v=4)](https://github.com/lwoschke "lwoschke (15 commits)")

---

Tags

captchaFormsstatamicspam protection

### Embed Badge

![Health badge](/badges/redcodede-captcha/health.svg)

```
[![Health](https://phpackages.com/badges/redcodede-captcha/health.svg)](https://phpackages.com/packages/redcodede-captcha)
```

###  Alternatives

[aryehraber/statamic-captcha

Protect your Statamic forms using a Captcha service

16194.4k](/packages/aryehraber-statamic-captcha)[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1862.4M7](/packages/karser-karser-recaptcha3-bundle)[nette/forms

📝 Nette Forms: generating, validating and processing secure forms in PHP. Handy API, fully customizable, server &amp; client side validation and mature design.

54013.2M450](/packages/nette-forms)[laminas/laminas-captcha

Generate and validate CAPTCHAs using Figlets, images, ReCaptcha, and more

2318.5M43](/packages/laminas-laminas-captcha)[pear/html_quickform2

Provides methods to create, validate and render HTML forms in PHP.

24498.9k2](/packages/pear-html-quickform2)[abanoubnassem/filament-grecaptcha-field

Provides a Google reCaptcha V2 field for the Filament Forms

27116.1k2](/packages/abanoubnassem-filament-grecaptcha-field)

PHPackages © 2026

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