PHP Class Prado\Web\UI\WebControls\TCaptchaValidator
Notice: while this class is easy to use and implement, it does not provide full security.
In fact, it's easy to bypass the checks reusing old, already-validated tokens (reply attack).
A better alternative is provided by {@link TReCaptchaValidator}.
TCaptchaValidator validates user input against a CAPTCHA represented by
a {@link TCaptcha} control. The input control fails validation if its value
is not the same as the token displayed in CAPTCHA. Note, if the user does
not enter any thing, it is still considered as failing the validation.
To use TCaptchaValidator, specify the {@link setControlToValidate ControlToValidate}
to be the ID path of the input control (usually a {@link TTextBox} control}.
Also specify the {@link setCaptchaControl CaptchaControl} to be the ID path of
the CAPTCHA control that the user input should be compared with.
Afficher le fichier
Open project: pradosoft/prado
Méthodes publiques
Méthodes protégées
Private Methods
Method Details
evaluateIsValid()
protected méthode
The validation succeeds if the input control has the same value
as the one displayed in the corresponding CAPTCHA control.
findCaptchaControl()
protected méthode
protected findCaptchaControl ( ) : TCaptchaControl |
Résultat |
TCaptchaControl |
the CAPTCHA control to be validated against |
getCaptchaControl()
public méthode
getClientClassName()
protected méthode
This method overrides the parent implementation.
getClientScriptOptions()
protected méthode
Returns an array of javascript validator options.
setCaptchaControl()
public méthode
The ID path is the dot-connected IDs of the controls reaching from
the validator's naming container to the target control.