PHP Class himiklab\yii2\recaptcha\ReCaptchaValidator

Author: HimikLab
Inheritance: extends yii\validators\Validator
显示文件 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_oe property

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

$secret public_oe property

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

$skipOnEmpty public_oe property

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

$uncheckedMessage public_oe property

public $uncheckedMessage