Your passport and I-20 or DS-2019 must remain valid while you are in the U.S., but you may remain in the U.S. with an expired F-1 or J-1 visa.