chore(@CommunityNewTokenView.qml): add validation for decimal points input

This commit is contained in:
Anastasiya Semiankevich 2023-06-23 15:14:22 +03:00 committed by Anastasiya Semenkevich
parent b0a48f35ee
commit 9df6e68a77
1 changed files with 2 additions and 1 deletions

View File

@ -335,7 +335,8 @@ StatusScrollView {
minLengthValidator.errorMessage: qsTr("Please enter how many decimals your token should have")
regexValidator.errorMessage: qsTr("Your decimal amount contains invalid characters (use 0-9 only)")
regexValidator.regularExpression: Constants.regularExpressions.numerical
extraValidator.validate: function (value) { return parseInt(value) > 0 && parseInt(value) <= 10 }
extraValidator.errorMessage: qsTr("Enter a number between 1 and 10")
onTextChanged: asset.decimals = parseInt(text)
}