From aa303940896f16ed98814382ece7c2d9e7190aa6 Mon Sep 17 00:00:00 2001 From: neingeist Date: Sat, 4 Dec 2021 15:45:50 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20improve=20length=20error=20message.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #4. --- prolefeeder.py | 4 +++- requirements.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/prolefeeder.py b/prolefeeder.py index 7b701ac..d0cda23 100644 --- a/prolefeeder.py +++ b/prolefeeder.py @@ -34,7 +34,9 @@ class DownloadForm(FlaskForm): length = IntegerField('Länge', validators=[ InputRequired(), - NumberRange(min=1, max=app.config['MAX_LENGTH'])]) + NumberRange( + min=1, max=app.config['MAX_LENGTH'], + message="Länge muss zwischen %(min)s and %(max)s Minuten sein")]) submit = SubmitField('Download') diff --git a/requirements.txt b/requirements.txt index c006d77..3e77d9d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ flask bootstrap-flask python-dotenv flask-wtf >= 1.0.0 +WTForms >= 3.0.0