move valid email checks to local tests