Skip to content

Instantly share code, notes, and snippets.

@martinsam
Created August 26, 2016 12:52
Show Gist options
  • Select an option

  • Save martinsam/fc0f65c8c0403376c3df0cfeef0bfd55 to your computer and use it in GitHub Desktop.

Select an option

Save martinsam/fc0f65c8c0403376c3df0cfeef0bfd55 to your computer and use it in GitHub Desktop.
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')
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment