2017 © Pedro Peláez
 

yii2-extension yii2-invisible-recaptcha

Validates form post with Goolge Invisible Recaptcha

image

bariew/yii2-invisible-recaptcha

Validates form post with Goolge Invisible Recaptcha

  • Monday, June 18, 2018
  • by bariew
  • Repository
  • 1 Watchers
  • 1 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 133 % Grown

The README.md

Yii2 invisible recaptcha component

Validates your ActiveForm using Google invisible-recaptcha, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist bariew/yii2-invisible-recaptcha "*"

or add, (*4)

"bariew/yii2-invisible-recaptcha": "*"

to the require section of your composer.json file., (*5)

Usage

  1. Set application config params:
    'params' => [
    ...
        'invisible-recaptcha-key' => '<Your Key>',
        'invisible-recaptcha-secret'  => '<Your Secret>'
    ]
  1. Add verification attribute and a validation rule into your model rules:
    public $verifyCode;

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            ...
            ['verifyCode', InvisibleRecaptchaValidator::className(), 'message' => 'Invalid captcha value'],
        ];
    }
  1. Use widget instead of ActiveForm submit button in your view:
    <?= $form->field($model, 'verifyCode')->widget(\bariew\invisibleRecaptcha\InvisibleRecaptchaWidget::className(), [
        'buttonText' => 'Save' ,
        'options' => ['class' => 'btn btn-primary'],
    ]); ?>

The Versions

18/06 2018

dev-master

9999999-dev

Validates form post with Goolge Invisible Recaptcha

  Sources   Download

BSD-3-Clause

by Bariev Pavel

extension yii2 validation recaptcha

18/06 2018

0.0.2

0.0.2.0

Validates form post with Goolge Invisible Recaptcha

  Sources   Download

BSD-3-Clause

by Bariev Pavel

extension yii2 validation recaptcha

27/03 2018

0.0.1

0.0.1.0

Validates form post with Goolge Invisible Recaptcha

  Sources   Download

BSD-3-Clause

by Bariev Pavel

extension yii2 validation recaptcha