dopo l'alert di errore metti un return false e sei a posto