If the door is still structurally sound, you can sand the rust spots and treat them with a rust inhibitor and then continue to prime and paint as usual. If there are any holes or breakage in the door from the rust, you may need to replace it entirely.