Fixing recaptcha validation

It needs the updater to be used in order to make the whole model invalid.
Would be nice to be able to mark the model as invalid without having to define
a specific error message.
This commit is contained in:
Sebastien Ros
2014-02-10 15:36:08 -08:00
parent f5779c9e89
commit 0a097fe7b0

View File

@@ -79,6 +79,7 @@ namespace Orchard.AntiSpam.Drivers {
if(!HandleValidateResponse(context, result)) {
_notifier.Error(T("The text you entered in the Captcha field does not match the image"));
updater.AddModelError("", T("The text you entered in the Captcha field does not match the image"));
}
}