diff --git a/interface.py b/interface.py index 4a94b7e..2683e6f 100644 --- a/interface.py +++ b/interface.py @@ -39,10 +39,14 @@ wartosc_regresji.grid(column=1, row=4, sticky='w') def val_numbers(): + max_metraz = 100000 + max_piętro = 100 metraz = metraz_entry.get() pietro = pietro_entry.get() if metraz == "" or not metraz.isdigit() or pietro=="" or not pietro.isdigit(): messagebox.showinfo(title="Error", message=f"Please provide valid data") + elif int(metraz) < 0 or int(metraz) > max_metraz or int(pietro) < 0 or int(pietro) > max_piętro: + messagebox.showinfo(title="Error", message=f"Please provide numbers between 0 to 100 for floors and 0 to 100.000 for metric area.") else: confirm = messagebox.askyesno(title="Confirm", message="Do you want to start prediction?")