chore: automatic commit 2025-04-30 12:48
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from wtforms.fields import Field
|
||||
|
||||
from . import widgets
|
||||
from .validators import Recaptcha
|
||||
|
||||
__all__ = ["RecaptchaField"]
|
||||
|
||||
|
||||
class RecaptchaField(Field):
|
||||
widget = widgets.RecaptchaWidget()
|
||||
|
||||
# error message if recaptcha validation fails
|
||||
recaptcha_error = None
|
||||
|
||||
def __init__(self, label="", validators=None, **kwargs):
|
||||
validators = validators or [Recaptcha()]
|
||||
super().__init__(label, validators, **kwargs)
|
||||
Reference in New Issue
Block a user