collect both, password and confirm password value, to check if both are same or not
below code will to design the above form, then we will check by entering data differently to validate entered data in password section and confirm password section is matching or not.
#program
try:
from Tkinter import *
except:
from tkinter import *
def display(message):
mb = Tk()
mb.geometry('200x50+250+75')
mb.title("Aeties_Action")
msg = Label(mb, text=message).pack()
mainloop()
def validate_pass():
if u_passe.get() == u_cnfpasse.get():
display("matched")
else:
display("mismatch")
mw = Tk()
mw.geometry("400x150+50+50")
mw.title("AETies : Automation Expert Technologies")
u_pass = Label(mw, text=' enter Password :', pady=5).pack()
u_passe = Entry(mw, width=20)
u_passe.pack()
u_cnfpass = Label(mw, text=' Confirm Password :', pady=5).pack()
u_cnfpasse = Entry(mw, width=20)
u_cnfpasse.pack()
num_btn = Button(mw, text=' Validate ', command=validate_pass).pack()
mainloop()
below are the different cases for match and mismatch case.
Comments
Post a Comment