From 56b9b9db114d00d95adb829a40514c29b9f294be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Mon, 25 Mar 2024 13:59:25 +0100 Subject: [PATCH] fix: Display name is not validated properly (UI part) - do not use the `alphanumericalExpanded: /^$|^[a-zA-Z0-9\-_\.\u0020]+$/` regex which contains the dot (`.`) character too; be explicit here and do what the error message says - the space character at start/end is validated above with the `startsWithSpaceValidator` CHERRY-PICK-TO: 2.28 Fixes #14127 --- ui/imports/utils/Constants.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/imports/utils/Constants.qml b/ui/imports/utils/Constants.qml index 635b8ee7a0..2e038fc3a0 100644 --- a/ui/imports/utils/Constants.qml +++ b/ui/imports/utils/Constants.qml @@ -540,7 +540,7 @@ QtObject { errorMessage: qsTr("Display Names can’t start or end with a space") }, StatusRegularExpressionValidator { - regularExpression: regularExpressions.alphanumericalExpanded + regularExpression: /^$|^[a-zA-Z0-9\-_\u0020]+$/ errorMessage: qsTr("Invalid characters (use A-Z and 0-9, hyphens and underscores only)") }, StatusMinLengthValidator {