SimpleCaptchaValidator

Implements \jelix\forms\Captcha\CaptchaValidatorInterface

package

jelix

Methods

called by the widget to initialize some data when the form is generated

initOnDisplay() : mixed

It can returns some data that can be useful for the widget, and which will be passed to validate() method ($internalData)

Response

mixed

Validate the data coming from the submitted form.

validate(string $value,  $internalData) : null|integer

It should returns null if it is ok, or one of jForms::ERRDATA_* constant

Arguments

$value

string

the value of the control if it exists

$internalData

Response

null|integer