Skip to content

Instantly share code, notes, and snippets.

@Porter97
Created February 13, 2020 19:54
Show Gist options
  • Save Porter97/084ff5141e7668d2a37e870117af426c to your computer and use it in GitHub Desktop.
Save Porter97/084ff5141e7668d2a37e870117af426c to your computer and use it in GitHub Desktop.
#...
from wtforms.validators import DataRequired, Length, Email, Regexp, URL
#...
class ContentForm(FlaskForm):
collection = SelectField(label='Collection', render_kw={'class': 'input-field'}, coerce=int, validators=[DataRequired()])
title = StringField(label='Title', validators=[DataRequired()])
description = StringField(label='Description')
url = StringField(label='URL', validators=[URL(), DataRequired()])
submit = SubmitField('Submit')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment