To come and visit to Mexico, the visitor’s passport must be current and there must be at least 2 months before it expires. If you go 3 weeks before it expires maybe the Mexican immigration office will not allow you to enter. But if it’s 2 months before, that’s fine. Also, right now the Mexican system has made some agreements with the US security system or the police that if a foreigner has some type of record of child abuse, even though if that person already has been in jail, it would be very difficult to enter to Mexico.
The majority of immigration officers work the same way. Even though the consulate may give the approval, it’s up to the immigration officers once you get to the Immigration booth in Mexican territory, to determine whether you can enter or not. Even though the Mexican consulate has issued the paper for you to enter and as soon as you get to the Mexican territory there is an alert like a trial or some criminal activity, they may say, “No, you cannot enter” even though the person has a tourist approval from the Mexican consulate.
If you show up with a passport that’s going to expire in 3 months, they may not give you a 6 month visitor visa. If that happens, for example here in Jalisco, you can go to the American consulate and get your passport renewed and then if they only gave 3 months, you can extend it here in Mexico up to the 6 months and not the 3 months.
(Map that shows the state of Jalisco, Mexico, pictured.)