1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-05 06:25:16 +01:00

Merge pull request #1393

d003b25 use regex for value input
This commit is contained in:
luigi1111 2018-05-21 23:10:29 -05:00
commit 5b725a4f20
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
2 changed files with 5 additions and 13 deletions

View File

@ -57,7 +57,7 @@ Rectangle {
var nfields = 0
s += current_address;
var amount = amountToReceiveLine.text.trim()
if (amount !== "") {
if (amount !== "" && amount.slice(-1) !== ".") {
s += (nfields++ ? "&" : "?")
s += "tx_amount=" + amount
}
@ -456,12 +456,8 @@ Rectangle {
placeholderText: qsTr("Amount to receive") + translationManager.emptyString
fontBold: true
inlineIcon: true
validator: DoubleValidator {
bottom: 0.0
top: 18446744.073709551615
decimals: 12
notation: DoubleValidator.StandardNotation
locale: "C"
validator: RegExpValidator {
regExp: /(\d{1,8})([.]\d{1,12})?$/
}
}
}

View File

@ -193,12 +193,8 @@ Rectangle {
inlineButtonText: qsTr("All") + translationManager.emptyString
inlineButton.onClicked: amountLine.text = "(all)"
validator: DoubleValidator {
bottom: 0.0
top: 18446744.073709551615
decimals: 12
notation: DoubleValidator.StandardNotation
locale: "C"
validator: RegExpValidator {
regExp: /(\d{1,8})([.]\d{1,12})?$/
}
}
}