From 78d08aa7511734b2b8c9811b9b7b7f6ddc3686ae Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Fri, 19 Jun 2026 14:07:40 +0200 Subject: [PATCH] comment input form validation required --- public/s/js/comments.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/s/js/comments.js b/public/s/js/comments.js index d9fc868..429c389 100644 --- a/public/s/js/comments.js +++ b/public/s/js/comments.js @@ -2186,7 +2186,7 @@ class CommentSystem { : ''; return `
- +
${counter} @@ -3103,7 +3103,10 @@ class CommentSystem { // Read current textarea value (we'll patch placeholder tokens after upload) let text = textarea.value.trim(); - if (!text && stagedItems.length === 0 && !pollPayload) return; + if (!text && stagedItems.length === 0 && !pollPayload) { + textarea.reportValidity(); + return; + } if (submitBtn.classList.contains('loading') || submitBtn.disabled) return; // ── Upload all staged files now (at submit time) ───────────────────────