Пример #1
0
class ContactForm(FlaskForm):
    name = fields.StringField("Name", [validators.Required()])
    email = EmailField("Email", [validators.Required(), validators.Email()])
    subject = fields.StringField("Subject", [validators.Required()])
    message = fields.TextAreaField("Message", [validators.Required()])
    recaptcha = recaptcha.RecaptchaField()
Пример #2
0
class FakeForm(Form):
    required = fields.StringField(validators=[validators.DataRequired()])
    choices = fields.SelectField(choices=(('first', ''), ('second', '')))
    email = fields.StringField(validators=[validators.Email()])