Skip to content

Add validation to the Send form (address and amount)#490

Merged
hebasto merged 1 commit intobitcoin-core:qt6from
johnny9:send-validation-qt6
Feb 16, 2026
Merged

Add validation to the Send form (address and amount)#490
hebasto merged 1 commit intobitcoin-core:qt6from
johnny9:send-validation-qt6

Conversation

@johnny9
Copy link
Collaborator

@johnny9 johnny9 commented Aug 1, 2025

These changes add properties for the error strings used in the QML to SendRecipient and add validation methods that are checked when the relevant properties are changed by the user.

image

This is a port of #462 into the qt6 branch

@johnny9
Copy link
Collaborator Author

johnny9 commented Aug 5, 2025

@MarnixCroes do you mind re-reviewing this change?

Copy link
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

55fdce2

  • The Amount must be greater than zero while there is only the placeholder text is a bit silly.
    Which can be repro'd by entering 0 and then deleting it.
image
  • The amount sometimes changes and gets negative when entering large numbers:
image
Screencast.from.2025-08-06.11-11-16.webm
Screencast.from.2025-08-06.11-13-03.webm

Validate address and amount inputs in the Send form with inline
error messages. The Review button is disabled until inputs are valid.

Address validation checks for valid destination format and provides
context-aware errors for wrong-network addresses. Amount validation
checks for positive value, MAX_MONEY limit, and available balance.

Adds input character filtering via regex validators, unit-aware
maximum length constraints, and overflow protection in btcToSats.
@johnny9 johnny9 force-pushed the send-validation-qt6 branch from 5ec53c0 to fb149bf Compare February 14, 2026 20:22
@johnny9
Copy link
Collaborator Author

johnny9 commented Feb 14, 2026

from 5ec53c0 to fb149bf

  • Squashed commits and summarized

@jarolrod
Copy link
Contributor

ACK fb149bf

@hebasto hebasto merged commit 3bb2c06 into bitcoin-core:qt6 Feb 16, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants