A US federal judge invalidated Department of Homeland Security visa regulations that sought to limit the stay of international students and…