from flask_wtf import FlaskForm from wtforms import DecimalField, StringField, SubmitField, TextAreaField from wtforms.validators import DataRequired, Email, Length, NumberRange class FeedbackForm(FlaskForm): email = StringField('Email', validators=[DataRequired(), Email()]) feedback = TextAreaField('Feedback', validators=[Length(0, 255)]) like_range = DecimalField('How would you rate nopaque?', validators=[DataRequired(), NumberRange(min=1, max=10)]) submit = SubmitField('Send feedback')