This is the varia library website work in progress.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

32 lines
806 B

"""Form object declaration."""
from flask_wtf import FlaskForm
from wtforms import (
StringField,
SubmitField,
)
from wtforms import validators
from wtforms.validators import Length
class BorrowForm(FlaskForm):
"""Borrow a publication form."""
borrowed = StringField(
"Fill in your name if you're going to borrow this publication.",
[
validators.InputRequired(),
Length(
min=3, message="Just so we know who is borrowing this book."
),
],
)
secret = StringField(
"Librarians secret:",
[
validators.InputRequired(),
Length(
min=2, message="Fill in the secret to unlock to library."
),
],
)
submit = SubmitField("Borrow")