输入错误时如何显示消息框?

时间:2018-12-09 21:07:46

标签: python-3.x tkinter

我正在尝试构建一个程序,该程序将创建一个帐户并验证输入并将其放置在文本文件中。如果您能浏览我的代码,我将不胜感激。我遇到的问题是,当错误的数据输入到文本框中时,无法使消息框弹出。如果您能显示输入无效的消息框,请多谢我。

$mail->isSMTP();   // by SMTP
$mail->SMTPDebug = 1;
$mail->SMTPAuth   = true;   // user and password
$mail->Host       = "mail.gandi.net";
$mail->Port       = 110;
$mail->Username   = $from;
$mail->Password   = "Password123";
// $mail->SMTPSecure = "";

1 个答案:

答案 0 :(得分:0)

您定义了一堆检查,但没有运行这些功能。例如:

def saveCustomerDetails():
    CustomerIDSave = CustomerIDVar.get()
    CustomerIDSave = CustomerIDSave.ljust(25)
    checkID() #add this to execute the checkID function