Re: Silva Captcha and Formulator

Andy Altepeter <[email protected]> Tue, 13 Apr 2010 06:53:33 -0500
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <[email protected]>
Hi Jon,

I'm not familiar with formulator external validators, but:

> from silva.captcha import validate
> input = context.REQUEST.form.get('field_captcha', None)
> if not validate(context, context.REQUEST, input):
>   return 'false'
> else:
>   return 'true'

you may want to try returning True and False (the python boolean keywords), 
not the strings 'true' and 'false'.  Both of the above strings evaluate to 
True.

peace,
Andy