PHP Class himiklab\yii2\recaptcha\ReCaptchaValidator

Author: HimikLab
Inheritance: extends yii\validators\Validator
Show file Open project: himiklab/yii2-recaptcha-widget Class Usage Examples

Public Properties

Property Type Description
$grabberType Choose your grabber for getting JSON, self::GRABBER_PHP = file_get_contents, self::GRABBER_CURL = CURL
$secret The shared key between your site and ReCAPTCHA.
$skipOnEmpty Whether to skip this validator if the input is empty.
$uncheckedMessage

Public Methods

Method Description
clientValidateAttribute ( Model $model, string $attribute, View $view ) : string
init ( )

Protected Methods

Method Description
getResponse ( string $request ) : mixed
validateValue ( string $value ) : array | null

Method Details

clientValidateAttribute() public method

public clientValidateAttribute ( Model $model, string $attribute, View $view ) : string
$model yii\base\Model
$attribute string
$view yii\web\View
return string

getResponse() protected method

protected getResponse ( string $request ) : mixed
$request string
return mixed

init() public method

public init ( )

validateValue() protected method

protected validateValue ( string $value ) : array | null
$value string
return array | null

Property Details

$grabberType public property

Choose your grabber for getting JSON, self::GRABBER_PHP = file_get_contents, self::GRABBER_CURL = CURL
public $grabberType

$secret public property

The shared key between your site and ReCAPTCHA.
public $secret

$skipOnEmpty public property

Whether to skip this validator if the input is empty.
public $skipOnEmpty

$uncheckedMessage public property

public $uncheckedMessage