From 17ae4263cdcfd6cbbb53acf317bc70d44c715675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Iskierko?= <61889657+endulab@users.noreply.github.com> Date: Thu, 21 Jul 2022 23:27:31 +0200 Subject: [PATCH] fix(StatusMinLengthValidator): Check if the text contains only whitespaces (#778) Fixes #6304 --- .../StatusQ/Controls/Validators/StatusMinLengthValidator.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusMinLengthValidator.qml b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusMinLengthValidator.qml index f9b4ca85e5..e36ce316f9 100644 --- a/ui/StatusQ/src/StatusQ/Controls/Validators/StatusMinLengthValidator.qml +++ b/ui/StatusQ/src/StatusQ/Controls/Validators/StatusMinLengthValidator.qml @@ -13,7 +13,7 @@ StatusValidator { } validate: function (value) { - return value.length >= minLength ? true : { + return value.length >= minLength && value.trim().length > 0 ? true : { min: minLength, actual: value.length }