Skip to content

Commit c5c00a5

Browse files
committed
Adjust the regular expression validator based on the amount type
1 parent a52c6cf commit c5c00a5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

qml/pages/wallet/Send.qml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ PageStack {
249249
}
250250
}
251251
validator: RegularExpressionValidator {
252-
regularExpression: /^(0|[1-9]\d*)(\.\d{0,8})?$/
252+
regularExpression: root.recipient.amount.unit === BitcoinAmount.BTC
253+
? /^(0|[1-9]\d{0,7})(\.\d{0,8})?$/
254+
: /^(0|[1-9]\d{0,15})$/
253255
}
254-
maximumLength: 17
256+
maximumLength: root.recipient.amount.unit === BitcoinAmount.BTC ? 17 : 16
255257
}
256258
Item {
257259
width: unitLabel.width + flipIcon.width

0 commit comments

Comments
 (0)