Is there a way to restrict the user to type only integer data, and throw an error if the input is not, in the age entrybox?
Here is the code I'm using:
from tkinter import *
main_window = Tk()
main_window.geometry("500x500")
# Labels
Label(main_window, text= "Whats your age").grid(row=1, column=0)
# Text input
age = Entry(main_window,width=50, borderwidth=5)
age.grid(row=1,column=1)
main_window.mainloop()