Jump to >


Mixins for providing reCAPTCHA validation support in forms.

See Using reCAPTCHA for a guide on using reCAPTCHA validation.

class RecaptchaFormMixin(*args, **kwargs)[source]

A form mixin for providing reCAPTCHA verification.

If other mixins are used, this should be the first in the list of base classes to ensure the reCAPTCHA field is the last.

Users of this mixin must set the request attribute as the current HttpRequest instance before clean() is called.

property verify_recaptcha[source]

Whether or not the reCAPTCHA is to be verified.


bool Whether or not the reCAPTCHA is to be verified.


Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.