parent
a5b87314f7
commit
0916d1db2c
|
@ -69,15 +69,15 @@ StatusModal {
|
|||
}
|
||||
validators: [
|
||||
StatusMinLengthValidator {
|
||||
errorMessage: qsTr("You need to enter an account name")
|
||||
minLength: 1
|
||||
errorMessage: qsTr("Account name must be at least %n character(s)", "", Constants.addAccountPopup.keyPairAccountNameMinLength)
|
||||
minLength: Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
},
|
||||
StatusRegularExpressionValidator {
|
||||
regularExpression: /^[^<>]+$/
|
||||
errorMessage: qsTr("This is not a valid account name")
|
||||
}
|
||||
]
|
||||
charLimit: 40
|
||||
charLimit: 20
|
||||
}
|
||||
|
||||
StatusColorSelectorGrid {
|
||||
|
|
|
@ -5,6 +5,7 @@ import QtQuick.Layouts 1.14
|
|||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Theme 0.1
|
||||
import StatusQ.Controls 0.1
|
||||
import StatusQ.Controls.Validators 0.1
|
||||
|
||||
import utils 1.0
|
||||
|
||||
|
@ -43,6 +44,13 @@ Item {
|
|||
onKeyPressed: {
|
||||
root.store.submitPopup(event)
|
||||
}
|
||||
|
||||
validators: [
|
||||
StatusMinLengthValidator {
|
||||
errorMessage: qsTr("Keypair name must be at least %n character(s)", "", Constants.addAccountPopup.keyPairAccountNameMinLength)
|
||||
minLength: Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
|
|
@ -126,8 +126,8 @@ Item {
|
|||
}
|
||||
validators: [
|
||||
StatusMinLengthValidator {
|
||||
minLength: 1
|
||||
errorMessage: Utils.getErrorMessage(accountName.errors, qsTr("wallet account name"))
|
||||
errorMessage: qsTr("Account name must be at least %n character(s)", "", Constants.addAccountPopup.keyPairAccountNameMinLength)
|
||||
minLength: Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
},
|
||||
StatusRegularExpressionValidator {
|
||||
regularExpression: Constants.regularExpressions.alphanumericalWithSpace
|
||||
|
|
|
@ -236,7 +236,7 @@ BasePopupStore {
|
|||
root.privateKeyAccAddress.loaded &&
|
||||
!root.privateKeyAccAddress.alreadyCreated &&
|
||||
root.privateKeyAccAddress.address !== "" &&
|
||||
root.addAccountModule.newKeyPairName !== ""
|
||||
root.addAccountModule.newKeyPairName.length >= Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -246,12 +246,12 @@ BasePopupStore {
|
|||
root.privateKeyAccAddress.loaded &&
|
||||
!root.privateKeyAccAddress.alreadyCreated &&
|
||||
root.privateKeyAccAddress.address !== "" &&
|
||||
root.addAccountModule.newKeyPairName !== ""
|
||||
root.addAccountModule.newKeyPairName.length >= Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
}
|
||||
|
||||
if (root.currentState.stateType === Constants.addAccountPopup.state.enterSeedPhrase) {
|
||||
return root.enteredSeedPhraseIsValid &&
|
||||
root.addAccountModule.newKeyPairName !== ""
|
||||
root.addAccountModule.newKeyPairName.length >= Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ BasePopupStore {
|
|||
}
|
||||
|
||||
if (root.currentState.stateType === Constants.addAccountPopup.state.enterKeypairName) {
|
||||
return root.addAccountModule.newKeyPairName !== ""
|
||||
return root.addAccountModule.newKeyPairName.length >= Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
}
|
||||
|
||||
return true
|
||||
|
|
|
@ -176,6 +176,13 @@ Item {
|
|||
onKeyPressed: {
|
||||
root.store.submitPopup(event)
|
||||
}
|
||||
|
||||
validators: [
|
||||
StatusMinLengthValidator {
|
||||
errorMessage: qsTr("Keypair name must be at least %n character(s)", "", Constants.addAccountPopup.keyPairAccountNameMinLength)
|
||||
minLength: Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
|
|
@ -88,6 +88,13 @@ Item {
|
|||
root.store.addAccountModule.newKeyPairName = text
|
||||
}
|
||||
|
||||
validators: [
|
||||
StatusMinLengthValidator {
|
||||
errorMessage: qsTr("Keypair name must be at least %n character(s)", "", Constants.addAccountPopup.keyPairAccountNameMinLength)
|
||||
minLength: Constants.addAccountPopup.keyPairAccountNameMinLength
|
||||
}
|
||||
]
|
||||
|
||||
onKeyPressed: {
|
||||
root.store.submitPopup(event)
|
||||
}
|
||||
|
|
|
@ -733,6 +733,7 @@ QtObject {
|
|||
readonly property int labelFontSize2: 13
|
||||
readonly property int footerButtonsHeight: 44
|
||||
readonly property int keyPairNameMaxLength: 20
|
||||
readonly property int keyPairAccountNameMinLength: 5
|
||||
readonly property int stepperWidth: 242
|
||||
readonly property int stepperHeight: 30
|
||||
|
||||
|
|
Loading…
Reference in New Issue