From 8f9d18dc714230f96bd9067d8dae42071869989c Mon Sep 17 00:00:00 2001 From: Kieran Date: Tue, 12 Mar 2024 15:31:50 -0700 Subject: [PATCH] Added input validation to help with cutoff date usage (#80) --- .../controllers/sources/source_html/source_form.html.heex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/pinchflat_web/controllers/sources/source_html/source_form.html.heex b/lib/pinchflat_web/controllers/sources/source_html/source_form.html.heex index 5c89574..bcc201e 100644 --- a/lib/pinchflat_web/controllers/sources/source_html/source_form.html.heex +++ b/lib/pinchflat_web/controllers/sources/source_html/source_form.html.heex @@ -62,6 +62,9 @@ type="text" label="Download Cutoff Date" placeholder="YYYY-MM-DD" + maxlength="10" + pattern="((?:19|20)[0-9][0-9])-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])" + title="YYYY-MM-DD" help="Only download media uploaded after this date. Leave blank to download all media. Must be in YYYY-MM-DD format" />