mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-24 12:39:25 +00:00
Changed regex to support amount lines starting with a period, but block the transaction creation wizard
This commit is contained in:
parent
b585e7b498
commit
ccb1f36083
1 changed files with 7 additions and 2 deletions
|
@ -162,7 +162,7 @@ Rectangle {
|
||||||
inlineButton.onClicked: amountLine.text = "(all)"
|
inlineButton.onClicked: amountLine.text = "(all)"
|
||||||
|
|
||||||
validator: RegExpValidator {
|
validator: RegExpValidator {
|
||||||
regExp: /(\d{1,8})([.]\d{1,12})?$/
|
regExp: /(.|)(\d{1,8})([.]\d{1,12})?$/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -337,7 +337,12 @@ Rectangle {
|
||||||
if(parseFloat(amountLine.text) > parseFloat(unlockedBalanceText)){
|
if(parseFloat(amountLine.text) > parseFloat(unlockedBalanceText)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The amount does not start with a period (example: `.4`)
|
||||||
|
if(amountLine.text.startsWith('.')){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|
Loading…
Reference in a new issue