fix(CreateCategoryPopup): ensure validation message is position correctly

Fixes #2973
This commit is contained in:
Pascal Precht 2021-07-21 12:16:07 +02:00 committed by Iuri Matias
parent cd37fa8e58
commit ee7fe04bd1
2 changed files with 2 additions and 3 deletions

View File

@ -629,8 +629,7 @@ QtObject {
let errMsg = "" let errMsg = ""
if(validation & Utils.Validate.NoEmpty && str === "") { if(validation & Utils.Validate.NoEmpty && str === "") {
//% "You need to enter a %1" errMsg = qsTr("You need to enter a %1").arg(fieldName)
errMsg = qsTrId("you-need-to-enter-a--1").arg(fieldName)
} }
if(validation & Utils.Validate.TextLength && str.length > limit) { if(validation & Utils.Validate.TextLength && str.length > limit) {

View File

@ -178,12 +178,12 @@ Item {
text: validationError text: validationError
anchors.top: inputField.bottom anchors.top: inputField.bottom
anchors.topMargin: validationErrorTopMargin anchors.topMargin: validationErrorTopMargin
anchors.right: inputField.right
selectByMouse: true selectByMouse: true
readOnly: true readOnly: true
font.pixelSize: 12 font.pixelSize: 12
height: 16 height: 16
color: validationErrorColor color: validationErrorColor
width: inputField.width
wrapMode: TextEdit.Wrap wrapMode: TextEdit.Wrap
} }
} }