Inserted missing validator notify callback object

This commit is contained in:
Marijn Kampf 2011-06-09 02:35:23 -07:00
parent dcccf5dd91
commit 0d88c9da19

View File

@ -47,7 +47,8 @@ class MathSpamProtectorField extends SpamProtectorField {
/**
* Validates the value submitted by the user with the one saved
* into the {@link Session}
* into the {@link Session} and then notify callback object
* with the spam checking result.
*
* @return bool
*/
@ -55,6 +56,15 @@ class MathSpamProtectorField extends SpamProtectorField {
if(!self::is_enabled()) return true;
if(!self::correct_answer($this->Value())){
$validator->validationError(
$this->name,
_t(
'MathSpamProtectionField.INCORRECTSOLUTION',
"Incorrect solution to the spam protection question, please try again.",
PR_MEDIUM
),
"error"
);
return false;
}