From 0253598e056d1dd8809dad2abc65ac1b3e55dd38 Mon Sep 17 00:00:00 2001 From: Abban Dunne Date: Tue, 3 Sep 2024 13:16:52 +0200 Subject: [PATCH] Add validation and error summary to comment form - Add check for empty comment on submit - Add new error for when the comment is empty - Add error type var to display the correct error - Add tests Ticket: https://phabricator.wikimedia.org/T367387 --- .../DonationCommentPopUp.vue | 47 ++++++++++++++++++- .../components/DonationCommentPopUp.spec.ts | 46 ++++++++++++++++-- 2 files changed, 86 insertions(+), 7 deletions(-) diff --git a/src/components/pages/donation_confirmation/DonationCommentPopUp.vue b/src/components/pages/donation_confirmation/DonationCommentPopUp.vue index 97bcbf9a5..66cbb08dd 100644 --- a/src/components/pages/donation_confirmation/DonationCommentPopUp.vue +++ b/src/components/pages/donation_confirmation/DonationCommentPopUp.vue @@ -16,6 +16,7 @@

{{ $t( 'donation_comment_popup_explanation' ) }}

+ @@ -45,6 +46,18 @@ {{ $t( 'donation_comment_popup_is_public' ) }} + +