Count chars with the comment input stripped - so that e.g. solely spaces (or trailing/starting spaces) do not count to the minimal required characters

This commit is contained in:
Roy Nieterau 2025-05-22 23:20:03 +02:00
parent 94d0725b11
commit f99550a74e

View file

@ -842,7 +842,7 @@ class PublisherWindow(QtWidgets.QDialog):
def _validate_comment(self) -> bool: def _validate_comment(self) -> bool:
# Validate comment length # Validate comment length
comment_def = self._controller.get_comment_def() comment_def = self._controller.get_comment_def()
char_count = len(self._comment_input.text()) char_count = len(self._comment_input.text().strip())
if ( if (
comment_def.minimum_chars_required comment_def.minimum_chars_required
and char_count < comment_def.minimum_chars_required and char_count < comment_def.minimum_chars_required