open-law/app/forms/book.py

9 lines
273 B
Python

from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField
from wtforms.validators import DataRequired, Length
class CreateBookForm(FlaskForm):
label = StringField("Label", [DataRequired(), Length(6, 1024)])
submit = SubmitField("Add new book")