fix(GenKeyModal): Add maximum length to input

Closes: #5066
This commit is contained in:
Boris Melnik 2022-03-21 17:25:01 +03:00
parent 1c52dd3b8e
commit bf1c809f15
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,7 @@ ModalPopup {
id: displayNameInput
placeholderText: "DisplayName"
validationError: displayNameValidationError
maxLength: 24
onTextChanged: {
if(displayNameInput.text === ""){
displayNameValidationError = qsTr("Display name is required")
@ -48,6 +49,8 @@ ModalPopup {
displayNameValidationError = qsTr(`Usernames ending with "_eth" are not allowed`)
} else if (globalUtils.isAlias(displayNameInput.text)){
displayNameValidationError = qsTr("Sorry, the name you have chosen is not allowed, try picking another username")
} else {
displayNameValidationError = ""
}
}
}