I am writing a python code to generate a contract when particular fields are filled the date field accepts any data instead of dd/mm/yyyy. I want an error message to be generated when an incorrect value is entered and until the right format is entered, the user cannot jump to the next field.
print("Hello, Welcome to Rent contract generator!")
def get():
first = input("Enter your name: ")
last = input("Enter your last name: ")
bday = input("Enter your birthday (dd/mm/yyyy): ")
address = input("Enter your address: ")
userid = input("Enter your ID number: ")
inputdata = (first, last, bday, address, userid)
print("Hello " + first + "! " + "Your rental contract is ready now :)")
return inputdata````