To apply for a visa to Vietnam, your passport must valid for at least 6 month from the date of entry and the passport must remain at least 2 blank page for visa and immigration stamps.
If your passport is about to expire or no blank page remains, you are advised to renew your passport before making visa application.
In case of renewing your passport after getting the visa approval letter, should you make new visa application to get new visa approval letter for matching the information (new passport number, new passport expiry date) in your new passport.