November 2015
Beginner to intermediate
340 pages
7h 29m
English
Let's discuss input data validation in Tkinter.
Most of the applications that we have developed in our book are point and click-based (the drum machine, game of chess, and drawing application), where a validation of user input is not required.
However, data validation is a must in programs such as the phonebook application, where a user enters some data and we store it in a database.
Ignoring user input validation can be dangerous in such applications because input data can be misused for SQL injection. In general, an application in which a user can enter textual data is a good candidate for the validation of user input. In fact, not trusting user inputs is almost considered a maxim.
Wrong user input may be intentional or accidental. ...