Required items in a form

A.T.Hofkamp hat at se-162.se.wtb.tue.nl
Wed Jul 2 03:43:48 EDT 2008


On 2008-07-01, Brandon <deanfamily11 at verizon.net> wrote:
> What I'm trying to do is essentially force a user to fill in required items 
> in a form, which will be saved to a database.  How can I get it so that once 
> the user clicks "OK" on the dialog box, it transfers control back to the 
> form, and not save the empty fields into the database? 

Follow the golden rule of not trusting user input.

When you get back values for the fields, check them, and if not correct, ask
again, give an error, abort the program, erase the data base, reboot the
system, whatever is appropiate to handle such an error.

Sincerely
Albert



More information about the Python-list mailing list