martinsam
8/26/2016 - 12:52 PM

Flask Form validation

Flask Form validation

class FooForm(Form):
    email = StringField(
        'Email',
        [
            validators.Length(
                min=3,
                max=40,
                message=u"Votre email doit comporter 3 à 40 caractères"),
            validators.Email('Adresse mail invalide')
        ])