From 491be746c8bc25ea03f18049dae23a9a1ecb70ef Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Thu, 2 Jul 2020 19:28:08 +0530 Subject: [PATCH] chore: add client-side empty comment validation Signed-off-by: Chinmay D. Pai --- frappe/templates/includes/comments/comments.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/templates/includes/comments/comments.html b/frappe/templates/includes/comments/comments.html index 87241ed075..ffd09523af 100644 --- a/frappe/templates/includes/comments/comments.html +++ b/frappe/templates/includes/comments/comments.html @@ -91,7 +91,7 @@ route: "{{ pathname }}", } - if(!args.comment) { + if(!args.comment || !args.comment.trim()) { frappe.msgprint("{{ _("Please add a valid comment.") }}"); return false; }