fix validation when comment content is empty

This commit is contained in:
2022-02-07 20:53:44 +01:00
parent 03007370bc
commit b3e65f0733
4 changed files with 20 additions and 12 deletions

View File

@@ -235,6 +235,8 @@ class NotificationController extends AbstractController
'id' => $notification->getId(),
'_fragment' => 'comment-' . $commentId,
]);
} elseif ($editedCommentForm->isSubmitted() && !$editedCommentForm->isValid()) {
$this->addFlash('error', $this->translator->trans('This form contains errors'));
}
}
}
@@ -256,6 +258,8 @@ class NotificationController extends AbstractController
return $this->redirectToRoute('chill_main_notification_show', [
'id' => $notification->getId(),
]);
} elseif ($appendCommentForm->isSubmitted() && !$appendCommentForm->isValid()) {
$this->addFlash('error', $this->translator->trans('This form contains errors'));
}
}
}