macgyer/yii2-spamshield

Mathematical captcha for Yii2

Maintainers

Package info

github.com/MacGyer/yii2-spamshield

Homepage

Type:yii2-extension

pkg:composer/macgyer/yii2-spamshield

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.0 2019-01-03 08:21 UTC

This package is auto-updated.

Last update: 2026-03-01 00:26:34 UTC


README

Installation

The preferred way of installation is through Composer. If you don't have Composer you can get it here: https://getcomposer.org/

You must be able to load NPM assets via Composer. This can either be achieved by the FXP composer asset plugin or by using Asset Packagist.

To install the package add the following to the require section of your composer.json:

"require": {
    "macgyer/yii2-spamshield": "*"
},

Usage

// in your ActiveForm

<?= $form->field($model, 'yourProperty')->widget(\macgyer\yii2spamshield\SpamShield::class) ?>

Please check the source for details on how to configure the widget instance.

// in your Model

public function rules()
{
    return [
        // other rules
        ['yourProperty', \macgyer\yii2spamshield\SpamShieldValidator::class]
    ];
}

Changelog

1.0.0 - 2019-01-02

  • initial release