beeware / toga

A Python native, OS native GUI toolkit.
https://toga.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
4.31k stars 668 forks source link

Fix 2325 textinput validation #2596

Closed PistachioCannoli closed 4 months ago

PistachioCannoli commented 4 months ago

Refactored on_change() and _validate() calls within Toga core as a new private method _value_changed(). This private method validates first before calling the on_change handler. Then I made the change across the appropriate backends. I then added a test to the core API within an existing TextInput test to confirm a value changes and updated the documentation to reflect the change.

Resolved validation order which prevented input changes from being properly validated.

Fixes #2325

PR Checklist: